Elaborate on implicit promotability

This commit is contained in:
Oliver Scherer 2019-04-08 18:34:45 +02:00
parent c63b9fff3f
commit ae4717d950

View File

@ -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 {