Files
rust/tests/ui/pattern/static-binding-shadow-16149.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
280 B
Rust
Raw Normal View History

2025-07-24 19:07:20 +05:00
//! Regression test for https://github.com/rust-lang/rust/issues/16149
2020-09-01 17:12:52 -04:00
extern "C" {
static externalValue: isize;
}
fn main() {
let boolValue = match 42 {
externalValue => true,
2016-06-03 23:15:00 +03:00
//~^ ERROR match bindings cannot shadow statics
2020-09-01 17:12:52 -04:00
_ => false,
};
}