From 9fb1c73a7309b83d495a4033c15c9e223da11f01 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Wed, 10 May 2023 17:33:58 +0000 Subject: [PATCH] Avoid shadowing. --- compiler/rustc_mir_transform/src/ref_prop.rs | 4 ++-- 1 file 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 38be7b3c7ea29..d1bc9ee91538e 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) {