rustc_middle::mir::interpret

Module error

Source

Macros§

impl_into_diag_arg_through_debug 🔒

Structs§

BadBytesAccess
Details of an access to uninitialized bytes / bad pointer bytes where it is not allowed.
Guard 🔒
Guard type that panics on drop.
InterpErrorBacktrace
InterpErrorInfo
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.
InterpErrorInfoInner 🔒
InterpResult_
The result type used by the interpreter. This is a newtype around Result to block access to operations like ok() that discard UB errors.
Misalignment
Information about a misaligned pointer.
ReportedErrorInfo
ScalarSizeMismatch
Information about a size mismatch.
ValidationErrorInfo

Enums§

CheckAlignMsg
Details of which pointer is not aligned.
CheckInAllocMsg
Details of why a pointer had to be in-bounds.
ErrorHandled
ExpectedKind
InterpErrorKind
InvalidMetaKind
InvalidProgramInfo
Error information for when the program we executed turned out not to actually be a valid program. This cannot happen in stand-alone Miri (except for layout errors that are only detect during monomorphization), but it can happen during CTFE/ConstProp where we work on generic code or execution does not have all information available.
PointerKind
ResourceExhaustionInfo
Error information for when the program exhausted the resources granted to it by the interpreter.
UndefinedBehaviorInfo
Error information for when the program caused Undefined Behavior.
UnsupportedOpInfo
Error information for when the program did something that might (or might not) be correct to do according to the Rust spec, but due to limitations in the interpreter, the operation could not be carried out. These limitations can differ between CTFE and the Miri engine, e.g., CTFE does not support dereferencing pointers at integral addresses.
ValidationErrorKind

Traits§

MachineStopType
A trait for machine-specific errors (or other “machine stop” conditions).

Functions§

interp_ok
print_backtrace 🔒

Type Aliases§

EvalStaticInitializerRawResult
EvalToAllocationRawResult
EvalToConstValueResult
EvalToValTreeResult
Ok(Err(ty)) indicates the constant was fine, but the valtree couldn’t be constructed because the value contains something of type ty that is not valtree-compatible. The caller can then show an appropriate error; the query does not have the necessary context to give good user-facing errors for this case.
InterpResult