diff options
| author | Ralf Jung <post@ralfj.de> | 2020-03-08 19:05:18 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-03-08 19:05:18 +0100 |
| commit | 48975946565e9a0adedb39a308db2fd2eeaa2839 (patch) | |
| tree | bb6cc7e30991d66e8830583f645a1edb211c706e | |
| parent | f943349eafaa75a60c05b0c84dcdb771d0eae8c9 (diff) | |
miri: ICE on invalid terminators
| -rw-r--r-- | src/librustc_mir/interpret/terminator.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/librustc_mir/interpret/terminator.rs b/src/librustc_mir/interpret/terminator.rs index ea8378574a3..85fd502c69c 100644 --- a/src/librustc_mir/interpret/terminator.rs +++ b/src/librustc_mir/interpret/terminator.rs @@ -114,15 +114,12 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { Unreachable => throw_ub!(Unreachable), // These should never occur for MIR we actually run. - DropAndReplace { .. } | FalseEdges { .. } | FalseUnwind { .. } => { - bug!("{:#?} should have been eliminated by MIR pass", terminator.kind) - } - - // These are not (yet) supported. It is unclear if they even can occur in - // MIR that we actually run. - Yield { .. } | GeneratorDrop | Abort => { - throw_unsup_format!("Unsupported terminator kind: {:#?}", terminator.kind) - } + DropAndReplace { .. } + | FalseEdges { .. } + | FalseUnwind { .. } + | Yield { .. } + | GeneratorDrop + | Abort => bug!("{:#?} should have been eliminated by MIR pass", terminator.kind), } Ok(()) |
