Skip to main content

Module constant_utils

Module constant_utils 

Source

Re-exports§

pub use self::uneval::*;

Modules§

uneval 🔒
Translate constants to hax: type-system constants, and the values read by rustc_const_uneval.

Structs§

ConstantExpr
Rustc has different representations for constants: one for MIR ([rustc_middle::mir::Const]), one for the type system ([rustc_middle::ty::ConstKind]). For simplicity hax maps those two constructs to the same ConstantExpr type.
ConstantFieldExpr
VariantIdx
The source-order index of a variant in a type.

Enums§

ConstSource
A constant that we can ask rustc to evaluate.
ConstantByte
A byte of an evaluated constant, in the MiniRust sense.
ConstantByteProvenance
What a pointer byte in an evaluated constant points to.
ConstantExprKind
The subset of expressions that corresponds to constants.
ConstantInt
ConstantLiteral
ConstantProjectionElem
Projects a place inside the pointee of a constant pointer.
ConstantPtrBase
The place a constant pointer starts from.
FnPtrTarget
The function a function pointer points to.
GlobalRef
A global allocation.
ReadMode
How to read back an evaluated constant.
VariantKind
Describe the kind of a variant