Rollup merge of #124185 - beepster4096:move_data_base_local_infallible, r=pnkfelix

Remove optionality from MoveData::base_local

This is an artifact from when Places could be based on statics and not just locals. Now, all move paths either are locals or have parents, so this doesn't need to return Option anymore.
This commit is contained in:
Matthias Krüger
2024-04-29 22:37:50 +02:00
committed by GitHub
2 changed files with 6 additions and 13 deletions

View File

@@ -109,9 +109,7 @@ impl LocalsStateAtExit {
has_storage_dead.visit_body(body);
let mut has_storage_dead_or_moved = has_storage_dead.0;
for move_out in &move_data.moves {
if let Some(index) = move_data.base_local(move_out.path) {
has_storage_dead_or_moved.insert(index);
}
has_storage_dead_or_moved.insert(move_data.base_local(move_out.path));
}
LocalsStateAtExit::SomeAreInvalidated { has_storage_dead_or_moved }
}