]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/transform/qualify_consts.rs
Auto merge of #61673 - RalfJung:miri-no-hard-float, r=eddyb,oli-obk
[rust.git] / src / librustc_mir / transform / qualify_consts.rs
index ca676cf194553e257ae2a49ba99ea3745b60576a..19bd812ec80c0106ab784b3dc4ab24321ac0eec8 100644 (file)
@@ -307,9 +307,9 @@ fn in_value(cx: &ConstCx<'_, 'tcx>, source: ValueSource<'_, 'tcx>) -> bool {
 
 /// Constant containing interior mutability (`UnsafeCell<T>`).
 /// This must be ruled out to make sure that evaluating the constant at compile-time
-/// and run-time would produce the same result. In particular, promotion of temporaries
-/// must not change program behavior; if the promoted could be written to, that would
-/// be a problem.
+/// and at *any point* during the run-time would produce the same result. In particular,
+/// promotion of temporaries must not change program behavior; if the promoted could be
+/// written to, that would be a problem.
 struct HasMutInterior;
 
 impl Qualif for HasMutInterior {
@@ -618,7 +618,7 @@ fn qualifs_in_value(&self, source: ValueSource<'_, 'tcx>) -> PerQualif<bool> {
     }
 }
 
-/// Checks MIR for const-correctness, using `ConstCx`
+/// Checks MIR for being admissible as a compile-time constant, using `ConstCx`
 /// for value qualifications, and accumulates writes of
 /// rvalue/call results to locals, in `local_qualif`.
 /// It also records candidates for promotion in `promotion_candidates`,