Relax cleanup to cleanup check

This commit is contained in:
Nathan Corbyn 2020-06-08 16:00:09 +01:00
parent 3aedfbecfd
commit 4158bb0f0b
1 changed files with 2 additions and 2 deletions

View File

@ -62,8 +62,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
(false, false, EdgeKind::Other)
// Non-cleanup blocks can jump to cleanup blocks along unwind edges
| (false, true, EdgeKind::Unwind)
// Cleanup blocks can jump to cleanup blocks along unwind edges
| (true, true, EdgeKind::Unwind) => {}
// Cleanup blocks can jump to cleanup blocks along any edges
| (true, true, _) => {}
// All other jumps are invalid
_ => {
self.fail(