Remove Nop in simplify_locals.
It's cheap and does not change anything.
This commit is contained in:
parent
028b4745f4
commit
e300abb593
36 changed files with 1 additions and 54 deletions
|
@ -569,6 +569,7 @@ fn remove_unused_definitions(used_locals: &mut UsedLocals, body: &mut Body<'_>)
|
|||
|
||||
StatementKind::SetDiscriminant { ref place, .. }
|
||||
| StatementKind::Deinit(ref place) => used_locals.is_used(place.local),
|
||||
StatementKind::Nop => false,
|
||||
_ => true,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue