We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c63b9ff commit ae4717dCopy full SHA for ae4717d
src/librustc_mir/transform/qualify_consts.rs
@@ -509,7 +509,10 @@ impl Qualif for IsNotPromotable {
509
}
510
511
/// Refers to temporaries which cannot be promoted *implicitly*.
512
-/// 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
513
+/// happening inside a constant, static or const fn. Inside a const context all constness rules
514
+/// apply, so implicit promotion simply has to follow the regular constant rules (modulo interior
515
+/// mutability or `Drop` rules which are handled `HasMutInterior` and `NeedsDrop` respectively)
516
struct IsNotImplicitlyPromotable;
517
518
impl Qualif for IsNotImplicitlyPromotable {
0 commit comments