mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
13 lines
283 B
Rust
13 lines
283 B
Rust
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);
|
|
}
|
|
_ => {}
|
|
};
|
|
}
|