Avoid shadowing.
This commit is contained in:
parent
aeac555578
commit
9fb1c73a73
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue