[−][src]Function rustc_passes::rvalue_promotion::check_expr_kind
fn check_expr_kind<'a, 'tcx>(
v: &mut CheckCrateVisitor<'a, 'tcx>,
e: &'tcx Expr,
node_ty: Ty<'tcx>
) -> Promotability
🔬 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.