diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-27033.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-27033.rs b/src/test/ui/issues/issue-27033.rs new file mode 100644 index 000000000..a23819a20 --- /dev/null +++ b/src/test/ui/issues/issue-27033.rs @@ -0,0 +1,12 @@ +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); + } + _ => {} + }; +} |