[−][src]Module rustc_mir::const_eval

Modules

error
eval_queries
fn_queries
machine

Structs

CompileTimeInterpreter

Extra machine state for CTFE, and the Machine instance

ConstEvalErr

When const-evaluation errors, this type is constructed with the resulting information, and then used to emit the error as a lint or hard error.

MemoryExtra

Enums

ConstEvalErrKind

The CTFE machine has some custom error kinds.

Functions

const_caller_location
deref_const
destructure_const

This function uses unwrap copiously, because an already validated constant must have valid fields and can thus never fail outside of compiler bugs. However, it is invoked from the pretty printer, where it can receive enums with no variants and e.g. read_discriminant needs to be able to handle that.

eval_to_allocation_raw_provider
eval_to_const_value_raw_provider
is_const_fn

Whether the def_id counts as const fn in your current crate, considering all active feature gates

is_min_const_fn

Returns true if this function must conform to min_const_fn

is_parent_const_impl_raw
is_unstable_const_fn

Whether the def_id is an unstable const fn and what feature gate is necessary to enable it

note_on_undefined_behavior_error
provide