diff options
| author | Gary Guo <gary@garyguo.net> | 2022-11-19 18:44:21 +0000 | 
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2023-04-06 09:34:16 +0100 | 
| commit | e29b5badbcf1d2f5e16bca00d067e07c18770f12 (patch) | |
| tree | 81b21672c33cdb6764ad04c55085fd4a7811eb1b | |
| parent | 5ae3a53a447bab9501ecb86b3fa686488c9f48dd (diff) | |
| download | rust-e29b5badbcf1d2f5e16bca00d067e07c18770f12.tar.gz rust-e29b5badbcf1d2f5e16bca00d067e07c18770f12.zip | |
Fix mir interp of `TerminatorKind::Terminate`
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/terminator.rs | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs index eef5518a1f8..a07702f7d9b 100644 --- a/compiler/rustc_const_eval/src/interpret/terminator.rs +++ b/compiler/rustc_const_eval/src/interpret/terminator.rs @@ -145,7 +145,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { } Terminate => { - M::abort(self, "the program aborted execution".to_owned())?; + // FIXME: maybe should call `panic_no_unwind` lang item instead. + M::abort(self, "panic in a function that cannot unwind".to_owned())?; } // When we encounter Resume, we've finished unwinding | 
