Fix dest prop miscompilation around references
This commit is contained in:
parent
e0bc267512
commit
4b6a4821b7
2 changed files with 17 additions and 1 deletions
|
@ -905,7 +905,7 @@ impl<'a, 'tcx> Visitor<'tcx> for FindAssignments<'a, 'tcx> {
|
|||
// FIXME: This can be smarter and take `StorageDead` into account (which
|
||||
// invalidates borrows).
|
||||
if self.ever_borrowed_locals.contains(dest.local)
|
||||
&& self.ever_borrowed_locals.contains(src.local)
|
||||
|| self.ever_borrowed_locals.contains(src.local)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue