Skip to content
Permalink
Browse files

Elaborate on implicit promotability

  • Loading branch information...
oli-obk committed Apr 8, 2019
1 parent c63b9ff commit ae4717d95010f2d75ba02c200ecd0ace7de0a93b
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/librustc_mir/transform/qualify_consts.rs
@@ -509,7 +509,10 @@ impl Qualif for IsNotPromotable {
}

/// Refers to temporaries which cannot be promoted *implicitly*.
/// Explicit promotion e.g. for constant arguments declared via `rustc_args_required_const`.
/// Explicit promotion e.g. for constant arguments declared via `rustc_args_required_const` or by
/// happening inside a constant, static or const fn. Inside a const context all constness rules
/// apply, so implicit promotion simply has to follow the regular constant rules (modulo interior
/// mutability or `Drop` rules which are handled `HasMutInterior` and `NeedsDrop` respectively)
struct IsNotImplicitlyPromotable;

impl Qualif for IsNotImplicitlyPromotable {

0 comments on commit ae4717d

Please sign in to comment.
You can’t perform that action at this time.