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
1 changed files with 1 additions and 4 deletions
|
@ -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) {
|
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());
|
on_entry.union(&*self.always_live_locals);
|
||||||
for local in self.always_live_locals.iter() {
|
|
||||||
on_entry.insert(local);
|
|
||||||
}
|
|
||||||
|
|
||||||
for arg in body.args_iter() {
|
for arg in body.args_iter() {
|
||||||
on_entry.insert(arg);
|
on_entry.insert(arg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue