Modules§
- check_
consts - Check the bodies of
consts,statics andconst fns for illegal operations. - const_
eval - errors 🔒
- interpret
- An interpreter for MIR used in CTFE and by miri
- util
Macros§
- enter_
trace_ span - Shorthand for calling crate::interpret::Machine::enter_trace_span on a tracing::info_span!.
This is supposed to be compiled out when crate::interpret::Machine::enter_trace_span has the
default implementation (i.e. when it does not actually enter the span but instead returns
()). This macro takes a type implementing the crate::interpret::Machine trait as its first argument and otherwise accepts the same syntax as tracing::span! (see some tips below). Note: the result of this macro must be used because the span is exited when it’s dropped.
Statics§
- CTRL_
C_ RECEIVED rustc_driver::maininstalls a handler that will set this totrueif the compiler has been sent a request to shut down, such as by a Ctrl-C. This static lives here because it is only read by the interpreter.
Functions§
- assert_
typing_ 🔒mode - Const eval always happens in post analysis mode in order to be able to use the hidden types of
opaque types. This is needed for trivial things like
size_of, but also for using associated types that are not specified in the opaque type. We also use MIR bodies whose opaque types have already been revealed, so we’d be able to at least partially observe the hidden types anyways. - provide