Expand description
A simple const eval API, for use on arbitrary HIR expressions.
This cannot use rustc’s const eval, aka miri, as arbitrary HIR expressions cannot be lowered to executable MIR bodies, so we have to do this instead.
Structs§
- Const
Eval Ctxt - The context required to evaluate a constant expression.
Enums§
- Constant
- A
LitKind
-like enum to fold constantExpr
s into. - Constant
Source - The source of a constant value.
- FullInt
Traits§
Functions§
- field_
of_ 🔒struct - lit_
to_ mir_ constant - Parses a
LitKind
to aConstant
. - mir_
is_ 🔒empty - mir_
to_ const