Struct rustc_middle::mir::interpret::InterpErrorInfo
source · pub struct InterpErrorInfo<'tcx>(Box<InterpErrorInfoInner<'tcx>>);
Expand description
Packages the kind of error we got from the const code interpreter
up with a Rust-level backtrace of where the error occurred.
These should always be constructed by calling .into()
on
an InterpError
. In rustc_mir::interpret
, we have throw_err_*
macros for this.
Tuple Fields
0: Box<InterpErrorInfoInner<'tcx>>
Implementations
sourceimpl<'tcx> InterpErrorInfo<'tcx>
impl<'tcx> InterpErrorInfo<'tcx>
pub fn print_backtrace(&self)
pub fn into_kind(self) -> InterpError<'tcx>
pub fn kind(&self) -> &InterpError<'tcx>
Trait Implementations
sourceimpl<'tcx> Debug for InterpErrorInfo<'tcx>
impl<'tcx> Debug for InterpErrorInfo<'tcx>
sourceimpl Display for InterpErrorInfo<'_>
impl Display for InterpErrorInfo<'_>
sourceimpl From<ErrorGuaranteed> for InterpErrorInfo<'_>
impl From<ErrorGuaranteed> for InterpErrorInfo<'_>
sourcefn from(err: ErrorGuaranteed) -> Self
fn from(err: ErrorGuaranteed) -> Self
Converts to this type from the input type.
sourceimpl From<ErrorHandled> for InterpErrorInfo<'_>
impl From<ErrorHandled> for InterpErrorInfo<'_>
sourcefn from(err: ErrorHandled) -> Self
fn from(err: ErrorHandled) -> Self
Converts to this type from the input type.
sourceimpl<'tcx> From<InterpError<'tcx>> for InterpErrorInfo<'tcx>
impl<'tcx> From<InterpError<'tcx>> for InterpErrorInfo<'tcx>
sourcefn from(kind: InterpError<'tcx>) -> Self
fn from(kind: InterpError<'tcx>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for InterpErrorInfo<'tcx>
impl<'tcx> Send for InterpErrorInfo<'tcx>
impl<'tcx> !Sync for InterpErrorInfo<'tcx>
impl<'tcx> Unpin for InterpErrorInfo<'tcx>
impl<'tcx> !UnwindSafe for InterpErrorInfo<'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, R> InternIteratorElement<T, R> for T
impl<T, R> InternIteratorElement<T, R> for T
type Output = R
fn intern_with<I, F>(iter: I, f: F) -> <T as InternIteratorElement<T, R>>::Outputwhere
I: Iterator<Item = T>,
F: FnOnce(&[T]) -> R,
sourceimpl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
sourceimpl<CTX, T> Value<CTX> for Twhere
CTX: DepContext,
impl<CTX, T> Value<CTX> for Twhere
CTX: DepContext,
default fn from_cycle_error(tcx: CTX) -> T
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes