Skip to content

Commit

Permalink
validation: remove a hack that is no longer necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Sep 14, 2017
1 parent a66f622 commit 91d9b83
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/librustc_mir/interpret/validation.rs
Expand Up @@ -398,23 +398,6 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
}
}

// HACK: For now, bail out if we hit a dead local during recovery (can happen because sometimes we have
// StorageDead before EndRegion due to https://github.com/rust-lang/rust/issues/43481).
// TODO: We should rather fix the MIR.
match query.lval.1 {
Lvalue::Local { frame, local } => {
let res = self.stack[frame].get_local(local);
match (res, mode) {
(Err(EvalError { kind: EvalErrorKind::DeadLocal, .. }),
ValidationMode::Recover(_)) => {
return Ok(());
}
_ => {}
}
}
_ => {}
}

query.ty = self.normalize_type_unerased(&query.ty);
trace!("{:?} on {:?}", mode, query);

Expand Down

0 comments on commit 91d9b83

Please sign in to comment.