Rollup merge of #77066 - jonas-schievink:dest-prop-borrow, r=oli-obk
Fix dest prop miscompilation around references Closes https://github.com/rust-lang/rust/issues/77002
This commit is contained in:
commit
452aa759b7
7 changed files with 205 additions and 179 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