Skip to content

Commit f6348f1

Browse files
author
hyd-dev
committed
Rewrite to a match
1 parent 4ad21c9 commit f6348f1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

compiler/rustc_mir/src/interpret/eval_context.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -857,15 +857,14 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
857857
panic!("Encountered StackPopCleanup::None when unwinding!")
858858
}
859859
};
860-
self.unwind_to_block(unwind)?;
860+
self.unwind_to_block(unwind)
861861
} else {
862862
// Follow the normal return edge.
863-
if let StackPopCleanup::Goto { ret, .. } = return_to_block {
864-
self.return_to_block(ret)?;
863+
match return_to_block {
864+
StackPopCleanup::Goto { ret, .. } => self.return_to_block(ret),
865+
StackPopCleanup::None { .. } => Ok(()),
865866
}
866867
}
867-
868-
Ok(())
869868
}
870869

871870
/// Mark a storage as live, killing the previous content.

0 commit comments

Comments
 (0)