Skip to content

Commit 2897a40

Browse files
committed
some error classes should be impossible
1 parent 1f2e704 commit 2897a40

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/eval.rs

+2
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) ->
203203
InterpError::Exit(code) => return Some(code.into()),
204204
err_unsup!(NoMirFor(..)) =>
205205
format!("{}. Did you set `MIRI_SYSROOT` to a Miri-enabled sysroot? You can prepare one with `cargo miri setup`.", e),
206+
InterpError::Panic(_) | InterpError::InvalidProgram(_) =>
207+
bug!("This error should be impossible in Miri: {}", e),
206208
_ => e.to_string()
207209
};
208210
e.print_backtrace();

0 commit comments

Comments
 (0)