about summary refs log tree commit diff
path: root/tests/ui/consts/issue-88649.rs
blob: 739b97ff708b5e160d90f23af06b77cb5458c94f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
    }
};