mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 21:53:56 +00:00
Improve MaybeStorageLive::initialize_start_block
.
We can union the two sets the easy way. This removes the need for the domain size check, because `union` does that same check itself.
This commit is contained in:
parent
481b5fadd7
commit
71789427a3
@ -28,10 +28,7 @@ impl<'a, 'tcx> Analysis<'tcx> for MaybeStorageLive<'a> {
|
||||
}
|
||||
|
||||
fn initialize_start_block(&self, body: &Body<'tcx>, on_entry: &mut Self::Domain) {
|
||||
assert_eq!(body.local_decls.len(), self.always_live_locals.domain_size());
|
||||
for local in self.always_live_locals.iter() {
|
||||
on_entry.insert(local);
|
||||
}
|
||||
on_entry.union(&*self.always_live_locals);
|
||||
|
||||
for arg in body.args_iter() {
|
||||
on_entry.insert(arg);
|
||||
|
Loading…
Reference in New Issue
Block a user