Rewrite to a match

This commit is contained in:
hyd-dev 2021-05-28 09:20:43 +08:00
parent 4ad21c9a9d
commit f6348f1924
No known key found for this signature in database
GPG Key ID: 74FA7FD5B8DA14B8

View File

@ -857,15 +857,14 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
panic!("Encountered StackPopCleanup::None when unwinding!")
}
};
self.unwind_to_block(unwind)?;
self.unwind_to_block(unwind)
} else {
// Follow the normal return edge.
if let StackPopCleanup::Goto { ret, .. } = return_to_block {
self.return_to_block(ret)?;
match return_to_block {
StackPopCleanup::Goto { ret, .. } => self.return_to_block(ret),
StackPopCleanup::None { .. } => Ok(()),
}
}
Ok(())
}
/// Mark a storage as live, killing the previous content.