Skip to content

Commit

Permalink
Address rebase fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Mar 23, 2022
1 parent c7efad0 commit 2dcf55d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_mir_transform/src/const_prop_lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine<'mir, 'tcx>
) -> InterpResult<'tcx, InterpOperand<Self::PointerTag>> {
let l = &frame.locals[local];

if l.value == LocalValue::Uninitialized {
if l.value == LocalValue::Unallocated {
throw_machine_stop_str!("tried to access an uninitialized local")
}

Expand Down Expand Up @@ -433,7 +433,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
/// but not reading from them anymore.
fn remove_const(ecx: &mut InterpCx<'mir, 'tcx, ConstPropMachine<'mir, 'tcx>>, local: Local) {
ecx.frame_mut().locals[local] =
LocalState { value: LocalValue::Uninitialized, layout: Cell::new(None) };
LocalState { value: LocalValue::Unallocated, layout: Cell::new(None) };
}

fn lint_root(&self, source_info: SourceInfo) -> Option<HirId> {
Expand Down Expand Up @@ -906,7 +906,7 @@ impl<'tcx> Visitor<'tcx> for ConstPropagator<'_, 'tcx> {
let frame = self.ecx.frame_mut();
frame.locals[local].value =
if let StatementKind::StorageLive(_) = statement.kind {
LocalValue::Uninitialized
LocalValue::Unallocated
} else {
LocalValue::Dead
};
Expand Down

0 comments on commit 2dcf55d

Please sign in to comment.