@@ -53,7 +53,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
5353 abi : Abi ,
5454 link_name : Symbol ,
5555 args : & [ OpTy < ' tcx , Provenance > ] ,
56- unwind : StackPopUnwind ,
56+ unwind : mir :: UnwindAction ,
5757 ) -> InterpResult < ' tcx > {
5858 let this = self . eval_context_mut ( ) ;
5959
@@ -106,7 +106,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
106106 & [ data. into ( ) ] ,
107107 None ,
108108 // Directly return to caller.
109- StackPopCleanup :: Goto { ret : Some ( ret) , unwind : StackPopUnwind :: Skip } ,
109+ StackPopCleanup :: Goto { ret : Some ( ret) , unwind : mir :: UnwindAction :: Continue } ,
110110 ) ?;
111111
112112 // We ourselves will return `0`, eventually (will be overwritten if we catch a panic).
@@ -157,7 +157,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
157157 & [ catch_unwind. data . into ( ) , payload. into ( ) ] ,
158158 None ,
159159 // Directly return to caller of `try`.
160- StackPopCleanup :: Goto { ret : Some ( catch_unwind. ret ) , unwind : StackPopUnwind :: Skip } ,
160+ StackPopCleanup :: Goto { ret : Some ( catch_unwind. ret ) , unwind : mir :: UnwindAction :: Continue } ,
161161 ) ?;
162162
163163 // We pushed a new stack frame, the engine should not do any jumping now!
@@ -168,7 +168,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
168168 }
169169
170170 /// Start a panic in the interpreter with the given message as payload.
171- fn start_panic ( & mut self , msg : & str , unwind : StackPopUnwind ) -> InterpResult < ' tcx > {
171+ fn start_panic ( & mut self , msg : & str , unwind : mir :: UnwindAction ) -> InterpResult < ' tcx > {
172172 let this = self . eval_context_mut ( ) ;
173173
174174 // First arg: message.
@@ -189,7 +189,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
189189 fn assert_panic (
190190 & mut self ,
191191 msg : & mir:: AssertMessage < ' tcx > ,
192- unwind : Option < mir:: BasicBlock > ,
192+ unwind : mir:: UnwindAction ,
193193 ) -> InterpResult < ' tcx > {
194194 use rustc_middle:: mir:: AssertKind :: * ;
195195 let this = self . eval_context_mut ( ) ;
@@ -213,10 +213,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
213213 None ,
214214 StackPopCleanup :: Goto {
215215 ret : None ,
216- unwind : match unwind {
217- Some ( cleanup) => StackPopUnwind :: Cleanup ( cleanup) ,
218- None => StackPopUnwind :: Skip ,
219- } ,
216+ unwind,
220217 } ,
221218 ) ?;
222219 }
@@ -240,10 +237,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
240237 None ,
241238 StackPopCleanup :: Goto {
242239 ret : None ,
243- unwind : match unwind {
244- Some ( cleanup) => StackPopUnwind :: Cleanup ( cleanup) ,
245- None => StackPopUnwind :: Skip ,
246- } ,
240+ unwind,
247241 } ,
248242 ) ?;
249243 }
@@ -252,10 +246,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
252246 // Forward everything else to `panic` lang item.
253247 this. start_panic (
254248 msg. description ( ) ,
255- match unwind {
256- Some ( cleanup) => StackPopUnwind :: Cleanup ( cleanup) ,
257- None => StackPopUnwind :: Skip ,
258- } ,
249+ unwind,
259250 ) ?;
260251 }
261252 }
0 commit comments