use let chains in hir, lint, mir
This commit is contained in:
@@ -637,16 +637,13 @@ impl<'tcx> Analysis<'tcx> for EverInitializedPlaces<'_, 'tcx> {
|
||||
debug!("initializes move_indexes {:?}", init_loc_map[location]);
|
||||
state.gen_all(init_loc_map[location].iter().copied());
|
||||
|
||||
if let mir::StatementKind::StorageDead(local) = stmt.kind {
|
||||
if let mir::StatementKind::StorageDead(local) = stmt.kind
|
||||
// End inits for StorageDead, so that an immutable variable can
|
||||
// be reinitialized on the next iteration of the loop.
|
||||
if let Some(move_path_index) = rev_lookup.find_local(local) {
|
||||
debug!(
|
||||
"clears the ever initialized status of {:?}",
|
||||
init_path_map[move_path_index]
|
||||
);
|
||||
state.kill_all(init_path_map[move_path_index].iter().copied());
|
||||
}
|
||||
&& let Some(move_path_index) = rev_lookup.find_local(local)
|
||||
{
|
||||
debug!("clears the ever initialized status of {:?}", init_path_map[move_path_index]);
|
||||
state.kill_all(init_path_map[move_path_index].iter().copied());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user