Remove Nop in simplify_locals.

It's cheap and does not change anything.
This commit is contained in:
Camille GILLOT 2022-12-04 19:25:20 +00:00
parent 028b4745f4
commit e300abb593
36 changed files with 1 additions and 54 deletions

View file

@ -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,
};