1
Fork 0

Fix dest prop miscompilation around references

This commit is contained in:
Jonas Schievink 2020-09-22 20:19:00 +02:00
parent e0bc267512
commit 4b6a4821b7
2 changed files with 17 additions and 1 deletions

View file

@ -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;
}