Module rustc_middle::mir::consts

source ·


  • Evaluated Constants Represents the result of const evaluation via the eval_to_allocation query. Not to be confused with ConstAllocation, which directly refers to the underlying data! Here we indirect via an AllocId.
  • An unevaluated (potentially generic) constant used in MIR.


  • Constants
  • Represents a constant value in Rust. Scalar and Slice are optimizations for array length computations, enum discriminants and the pattern matching logic.