Skip to content

Commit 0654c0a

Browse files
bjorn3folkertdev
authored andcommitted
Add assertion to loop-match/drop-in-march-arm.rs
1 parent ac721f8 commit 0654c0a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/ui/loop-match/drop-in-match-arm.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,15 @@ fn helper() -> i32 {
3232
state = 'blk: {
3333
match state {
3434
0 => match X {
35-
_ => break 'blk 1,
35+
_ => {
36+
assert!(!DROPPED.load(Ordering::Relaxed));
37+
break 'blk 1;
38+
}
3639
},
37-
_ => break 'a state,
40+
_ => {
41+
assert!(DROPPED.load(Ordering::Relaxed));
42+
break 'a state;
43+
}
3844
}
3945
};
4046
}

0 commit comments

Comments
 (0)