diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-10 17:33:58 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-10 19:23:01 +0000 |
| commit | 9fb1c73a7309b83d495a4033c15c9e223da11f01 (patch) | |
| tree | fd647d2b34dd22f52e5725cffa4a21c414b33aa0 /compiler/rustc_mir_transform/src | |
| parent | aeac5555780cb11cf701a5fa69d66adcaa3e2f4a (diff) | |
| download | rust-9fb1c73a7309b83d495a4033c15c9e223da11f01.tar.gz rust-9fb1c73a7309b83d495a4033c15c9e223da11f01.zip | |
Avoid shadowing.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/ref_prop.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/ref_prop.rs b/compiler/rustc_mir_transform/src/ref_prop.rs index 38be7b3c7ea..d1bc9ee9153 100644 --- a/compiler/rustc_mir_transform/src/ref_prop.rs +++ b/compiler/rustc_mir_transform/src/ref_prop.rs @@ -223,10 +223,10 @@ fn compute_replacement<'tcx>( let mut place = *place; // Try to see through `place` in order to collapse reborrow chains. if place.projection.first() == Some(&PlaceElem::Deref) - && let Value::Pointer(target, needs_unique) = targets[place.local] + && let Value::Pointer(target, inner_needs_unique) = targets[place.local] // Only see through immutable reference and pointers, as we do not know yet if // mutable references are fully replaced. - && !needs_unique + && !inner_needs_unique // Only collapse chain if the pointee is definitely live. && can_perform_opt(target, location) { |
