about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/ref_prop.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-13 00:31:53 +0000
committerbors <bors@rust-lang.org>2024-02-13 00:31:53 +0000
commit0a5b998c57a8681acc13206b5917340b053b3a30 (patch)
treed673efacffd4baf86b67a6d9e2e511a1d2db8888 /compiler/rustc_mir_transform/src/ref_prop.rs
parent74c3f5a146860c94ff4d179fc3bfa34f879adf41 (diff)
parent8a87cdacb15d4856e60388d456449158e3f542b6 (diff)
downloadrust-0a5b998c57a8681acc13206b5917340b053b3a30.tar.gz
rust-0a5b998c57a8681acc13206b5917340b053b3a30.zip
Auto merge of #120991 - matthiaskrgr:rollup-f8kw2st, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #118983 (Warn on references casting to bigger memory layout)
 - #119451 (Gate PR CI on clippy correctness lints)
 - #120273 (compiletest: few naive improvements)
 - #120950 (Fix async closures in CTFE)
 - #120958 (Dejargonize `subst`)
 - #120965 (Add lahfsahf and prfchw target feature)
 - #120970 (add another test for promoteds-in-static)
 - #120979 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src/ref_prop.rs')
-rw-r--r--compiler/rustc_mir_transform/src/ref_prop.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_mir_transform/src/ref_prop.rs b/compiler/rustc_mir_transform/src/ref_prop.rs
index 05a3ac3cc75..d5642be5513 100644
--- a/compiler/rustc_mir_transform/src/ref_prop.rs
+++ b/compiler/rustc_mir_transform/src/ref_prop.rs
@@ -44,7 +44,7 @@ use crate::ssa::{SsaLocals, StorageLiveLocals};
 ///
 /// # Liveness
 ///
-/// When performing a substitution, we must take care not to introduce uses of dangling locals.
+/// When performing an instantiation, we must take care not to introduce uses of dangling locals.
 /// To ensure this, we walk the body with the `MaybeStorageDead` dataflow analysis:
 /// - if we want to replace `*x` by reborrow `*y` and `y` may be dead, we allow replacement and
 ///   mark storage statements on `y` for removal;
@@ -55,7 +55,7 @@ use crate::ssa::{SsaLocals, StorageLiveLocals};
 ///
 /// For `&mut` borrows, we also need to preserve the uniqueness property:
 /// we must avoid creating a state where we interleave uses of `*_1` and `_2`.
-/// To do it, we only perform full substitution of mutable borrows:
+/// To do it, we only perform full instantiation of mutable borrows:
 /// we replace either all or none of the occurrences of `*_1`.
 ///
 /// Some care has to be taken when `_1` is copied in other locals.
@@ -63,10 +63,10 @@ use crate::ssa::{SsaLocals, StorageLiveLocals};
 ///   _3 = *_1;
 ///   _4 = _1
 ///   _5 = *_4
-/// In such cases, fully substituting `_1` means fully substituting all of the copies.
+/// In such cases, fully instantiating `_1` means fully instantiating all of the copies.
 ///
 /// For immutable borrows, we do not need to preserve such uniqueness property,
-/// so we perform all the possible substitutions without removing the `_1 = &_2` statement.
+/// so we perform all the possible instantiations without removing the `_1 = &_2` statement.
 pub struct ReferencePropagation;
 
 impl<'tcx> MirPass<'tcx> for ReferencePropagation {