Skip to main content

assert_typing_mode

Function assert_typing_mode 

Source
pub(crate) fn assert_typing_mode(typing_mode: TypingMode<'_>)
Expand description

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.