add an assertion that machine hook doesn't return NoCleanup
This commit is contained in:
parent
dd5a447b5a
commit
54e11cf378
@ -899,10 +899,12 @@ pub fn pop_stack_frame(
|
||||
let return_to_block = frame.return_to_block;
|
||||
let return_place = frame.return_place.clone();
|
||||
|
||||
let return_action = if cleanup {
|
||||
M::after_stack_pop(self, frame, unwinding)?
|
||||
let return_action;
|
||||
if cleanup {
|
||||
return_action = M::after_stack_pop(self, frame, unwinding)?;
|
||||
assert_ne!(return_action, ReturnAction::NoCleanup);
|
||||
} else {
|
||||
ReturnAction::NoCleanup
|
||||
return_action = ReturnAction::NoCleanup;
|
||||
};
|
||||
|
||||
Ok(StackPopInfo { return_action, return_to_block, return_place })
|
||||
|
Loading…
Reference in New Issue
Block a user