Function rustc_passes::rvalue_promotion::check_expr[][src]

fn check_expr<'a, 'tcx>(
    v: &mut CheckCrateVisitor<'a, 'tcx>,
    e: &Expr,
    node_ty: Ty<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

This function is used to enforce the constraints on const/static items. It walks through the value of the item walking down the expression and evaluating every nested expression. If the expression is not part of a const/static item, it is qualified for promotion instead of producing errors.