rust/tests/ui/pattern/match-at-pattern-shadows-name.rs
reddevilmidzy 1bd997a452 Cleaned up some tests
Split invalid-compile-flags into run-pass & invalid

Update tests/ui/README.md
2025-12-16 02:10:08 +09:00

14 lines
367 B
Rust

//! regression test for https://github.com/rust-lang/rust/issues/27033
fn main() {
match Some(1) {
None @ _ => {} //~ ERROR match bindings cannot shadow unit variants
};
const C: u8 = 1;
match 1 {
C @ 2 => {
//~^ ERROR match bindings cannot shadow constant
println!("{}", C);
}
_ => {}
};
}