2015-07-28 08:52:54 -05:00
|
|
|
fn main() {
|
|
|
|
match Some(1) {
|
2016-09-14 16:51:46 -05:00
|
|
|
None @ _ => {} //~ ERROR match bindings cannot shadow unit variants
|
2015-07-28 08:52:54 -05:00
|
|
|
};
|
|
|
|
const C: u8 = 1;
|
|
|
|
match 1 {
|
2016-06-03 15:15:00 -05:00
|
|
|
C @ 2 => { //~ ERROR match bindings cannot shadow constant
|
2015-07-28 08:52:54 -05:00
|
|
|
println!("{}", C);
|
|
|
|
}
|
|
|
|
_ => {}
|
|
|
|
};
|
|
|
|
}
|