mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
19 lines
296 B
Rust
19 lines
296 B
Rust
//@ 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;
|
|
}
|
|
};
|