Skip to content

Commit

Permalink
Add a regression test for rust-lang#88649
Browse files Browse the repository at this point in the history
  • Loading branch information
hyd-dev committed Sep 6, 2021
1 parent 1c858ba commit 214eef0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/ui/consts/issue-88649.rs
Original file line number Diff line number Diff line change
@@ -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;
}
};

0 comments on commit 214eef0

Please sign in to comment.