Skip to content

Commit 214eef0

Browse files
author
hyd-dev
committed
Add a regression test for #88649
1 parent 1c858ba commit 214eef0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/test/ui/consts/issue-88649.rs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// check-pass
2+
#![crate_type = "lib"]
3+
4+
enum Foo {
5+
Variant1(bool),
6+
Variant2(bool),
7+
}
8+
9+
const _: () = {
10+
let mut n = 0;
11+
while n < 2 {
12+
match Foo::Variant1(true) {
13+
Foo::Variant1(x) | Foo::Variant2(x) if x => {}
14+
_ => {}
15+
}
16+
n += 1;
17+
}
18+
};

0 commit comments

Comments
 (0)