mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
Add a regression test for https://github.com/rust-lang/rust/issues/88649
This commit is contained in:
parent
1c858ba5bf
commit
214eef0435
18
src/test/ui/consts/issue-88649.rs
Normal file
18
src/test/ui/consts/issue-88649.rs
Normal file
@ -0,0 +1,18 @@
|
||||
// check-pass
|
||||
#![crate_type = "lib"]
|
||||
|
||||
enum Foo {
|
||||
Variant1(bool),
|
||||
Variant2(bool),
|
||||
}
|
||||
|
||||
const _: () = {
|
||||
let mut n = 0;
|
||||
while n < 2 {
|
||||
match Foo::Variant1(true) {
|
||||
Foo::Variant1(x) | Foo::Variant2(x) if x => {}
|
||||
_ => {}
|
||||
}
|
||||
n += 1;
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user