about summary refs log tree commit diff
path: root/tests/ui/pattern/static-binding-shadow-16149.rs
blob: a46f78214c70d06a0611761df42dbcbc76017f36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Regression test for https://github.com/rust-lang/rust/issues/16149

extern "C" {
    static externalValue: isize;
}

fn main() {
    let boolValue = match 42 {
        externalValue => true,
        //~^ ERROR match bindings cannot shadow statics
        _ => false,
    };
}