Skip to content

Commit 91d9b83

Browse files
committed
validation: remove a hack that is no longer necessary
1 parent a66f622 commit 91d9b83

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/librustc_mir/interpret/validation.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -398,23 +398,6 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
398398
}
399399
}
400400

401-
// HACK: For now, bail out if we hit a dead local during recovery (can happen because sometimes we have
402-
// StorageDead before EndRegion due to https://github.com/rust-lang/rust/issues/43481).
403-
// TODO: We should rather fix the MIR.
404-
match query.lval.1 {
405-
Lvalue::Local { frame, local } => {
406-
let res = self.stack[frame].get_local(local);
407-
match (res, mode) {
408-
(Err(EvalError { kind: EvalErrorKind::DeadLocal, .. }),
409-
ValidationMode::Recover(_)) => {
410-
return Ok(());
411-
}
412-
_ => {}
413-
}
414-
}
415-
_ => {}
416-
}
417-
418401
query.ty = self.normalize_type_unerased(&query.ty);
419402
trace!("{:?} on {:?}", mode, query);
420403

0 commit comments

Comments
 (0)