@@ -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.
@@ -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 }
@@ -252,10 +249,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
252249 // Forward everything else to `panic` lang item.
253250 this. start_panic (
254251 msg. description ( ) ,
255- match unwind {
256- Some ( cleanup) => StackPopUnwind :: Cleanup ( cleanup) ,
257- None => StackPopUnwind :: Skip ,
258- } ,
252+ unwind,
259253 ) ?;
260254 }
261255 }
0 commit comments