Skip to content

Commit 4158bb0

Browse files
committed
Relax cleanup to cleanup check
1 parent 3aedfbe commit 4158bb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_mir/transform/validate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
6262
(false, false, EdgeKind::Other)
6363
// Non-cleanup blocks can jump to cleanup blocks along unwind edges
6464
| (false, true, EdgeKind::Unwind)
65-
// Cleanup blocks can jump to cleanup blocks along unwind edges
66-
| (true, true, EdgeKind::Unwind) => {}
65+
// Cleanup blocks can jump to cleanup blocks along any edges
66+
| (true, true, _) => {}
6767
// All other jumps are invalid
6868
_ => {
6969
self.fail(

0 commit comments

Comments
 (0)