Run time glue code (program entrypoint, tests, ...)
Modules
Functions
-
fn in_const_context() -> bool
Returns
true
when evaluated in a const context andfalse
otherwise.Example
use std::runtime::in_const_context; const IN_CONST_CONTEXT: bool = in_const_context(); assert!(IN_CONST_CONTEXT); assert!(!in_const_context());
Run this example
Macros
Returns
true
when the argument is an expression that can be evaluated
at compile time.
Forces the evaluation of the argument at compile time.