Skip to content

Commit 2dcf55d

Browse files
committed
Address rebase fallout
1 parent c7efad0 commit 2dcf55d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_mir_transform/src/const_prop_lint.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine<'mir, 'tcx>
235235
) -> InterpResult<'tcx, InterpOperand<Self::PointerTag>> {
236236
let l = &frame.locals[local];
237237

238-
if l.value == LocalValue::Uninitialized {
238+
if l.value == LocalValue::Unallocated {
239239
throw_machine_stop_str!("tried to access an uninitialized local")
240240
}
241241

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

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

0 commit comments

Comments
 (0)