Skip to content

Commit b1f5e07

Browse files
committed
Update MaybeUninitLocals to current Analysis API
1 parent 577dcd3 commit b1f5e07

File tree

1 file changed

+2
-9
lines changed
  • compiler/rustc_mir_transform/src

1 file changed

+2
-9
lines changed

compiler/rustc_mir_transform/src/ssa.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedLocals {
419419
}
420420

421421
fn apply_primary_statement_effect(
422-
&mut self,
422+
&self,
423423
state: &mut Self::Domain,
424424
statement: &Statement<'tcx>,
425425
_location: Location,
@@ -431,13 +431,6 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedLocals {
431431
state.remove(local);
432432
}
433433
}
434-
// Deinit makes the local uninitialized.
435-
StatementKind::Deinit(box place) => {
436-
// A deinit makes a local uninitialized.
437-
if let Some(local) = place.as_local() {
438-
state.insert(local);
439-
}
440-
}
441434
// Storage{Live,Dead} makes a local uninitialized.
442435
StatementKind::StorageLive(local) | StatementKind::StorageDead(local) => {
443436
state.insert(local);
@@ -447,7 +440,7 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedLocals {
447440
}
448441

449442
fn apply_call_return_effect(
450-
&mut self,
443+
&self,
451444
state: &mut Self::Domain,
452445
_block: BasicBlock,
453446
return_places: CallReturnPlaces<'_, 'tcx>,

0 commit comments

Comments
 (0)