mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +00:00
15 lines
367 B
Rust
15 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);
|
|
}
|
|
_ => {}
|
|
};
|
|
}
|