1
Fork 0

Only exclude locals if the place is not indirect.

This commit is contained in:
Camille GILLOT 2023-01-21 21:53:26 +00:00
parent 0d59b8c997
commit cd3649b2a5
3 changed files with 24 additions and 18 deletions

View file

@ -121,7 +121,9 @@ where
// for now. See discussion on [#61069].
//
// [#61069]: https://github.com/rust-lang/rust/pull/61069
self.trans.gen(dropped_place.local);
if !dropped_place.is_indirect() {
self.trans.gen(dropped_place.local);
}
}
TerminatorKind::Abort