about summary refs log tree commit diff
path: root/src/librustc_mir/transform
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2019-04-10 11:21:19 +0200
committerOliver Scherer <github35764891676564198441@oli-obk.de>2019-04-10 11:21:19 +0200
commitf10394ae0c5f2f73d1eba688c2cf5832eb38bc96 (patch)
tree48d966e51518af39a0b2cf01db9c85a68a166f70 /src/librustc_mir/transform
parentae4717d95010f2d75ba02c200ecd0ace7de0a93b (diff)
downloadrust-f10394ae0c5f2f73d1eba688c2cf5832eb38bc96.tar.gz
rust-f10394ae0c5f2f73d1eba688c2cf5832eb38bc96.zip
Documentation should have proper grammar
Diffstat (limited to 'src/librustc_mir/transform')
-rw-r--r--src/librustc_mir/transform/qualify_consts.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/librustc_mir/transform/qualify_consts.rs b/src/librustc_mir/transform/qualify_consts.rs
index 5f8e7ad796b..3154f8e89e3 100644
--- a/src/librustc_mir/transform/qualify_consts.rs
+++ b/src/librustc_mir/transform/qualify_consts.rs
@@ -509,10 +509,13 @@ 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` or by
-/// happening inside a constant, static or const fn. Inside a const context all constness rules
+/// Explicit promotion happens e.g. for constant arguments declared via `rustc_args_required_const`.
+/// 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)
+/// mutability or `Drop` rules which are handled `HasMutInterior` and `NeedsDrop` respectively).
+/// Implicit promotion inside regular functions does not happen if `const fn` calls are involved,
+/// as the call may be perfectly alright at runtime, but fail at compile time e.g. due to addresses
+/// being compared inside the function.
 struct IsNotImplicitlyPromotable;
 
 impl Qualif for IsNotImplicitlyPromotable {