about summary refs log tree commit diff
path: root/tests/ui/issues/issue-2848.rs
blob: 8499459cec269ac020404624a705fd27cdc6b4de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[allow(non_camel_case_types)]

mod bar {
    pub enum foo {
        alpha,
        beta,
        charlie
    }
}

fn main() {
    use bar::foo::{alpha, charlie};
    match alpha {
      alpha | beta => {} //~ ERROR variable `beta` is not bound in all patterns
      //~^ ERROR `beta` is named the same as one of the variants
      charlie => {}
    }
}