1
Fork 0

Don't require owned data in MaybeStorageLive

This commit is contained in:
Jakob Degen 2022-12-13 04:22:47 -08:00
parent 109cccbe4f
commit 3522d48112
3 changed files with 10 additions and 9 deletions

View file

@ -490,7 +490,7 @@ fn locals_live_across_suspend_points<'tcx>(
// Calculate when MIR locals have live storage. This gives us an upper bound of their
// lifetimes.
let mut storage_live = MaybeStorageLive::new(always_live_locals.clone())
let mut storage_live = MaybeStorageLive::new(std::borrow::Cow::Borrowed(always_live_locals))
.into_engine(tcx, body_ref)
.iterate_to_fixpoint()
.into_results_cursor(body_ref);