rust/tests/ui/pattern/static-binding-shadow-16149.rs
2025-07-25 15:34:28 +05:00

12 lines
208 B
Rust

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