rust/tests/ui/pattern/static-binding-shadow-16149.rs
2025-08-09 16:27:20 +05:00

14 lines
280 B
Rust

//! 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,
};
}