diff options
| author | Ralf Jung <post@ralfj.de> | 2017-09-14 10:00:37 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2017-09-14 10:00:37 +0200 |
| commit | 91d9b83db26676bd0d178ceb9abfc53cae3907bc (patch) | |
| tree | 42b006e435a8828ebf255c46d38b7295d8cb1890 | |
| parent | a66f622a98cbfed0f32b38af64fa68b8fad12cd7 (diff) | |
| download | rust-91d9b83db26676bd0d178ceb9abfc53cae3907bc.tar.gz rust-91d9b83db26676bd0d178ceb9abfc53cae3907bc.zip | |
validation: remove a hack that is no longer necessary
| -rw-r--r-- | src/librustc_mir/interpret/validation.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/librustc_mir/interpret/validation.rs b/src/librustc_mir/interpret/validation.rs index 251bd71ffce..23bb0d8dbb7 100644 --- a/src/librustc_mir/interpret/validation.rs +++ b/src/librustc_mir/interpret/validation.rs @@ -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); |
