diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-17718-patterns.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-17718-patterns.rs b/src/test/ui/issues/issue-17718-patterns.rs new file mode 100644 index 000000000..2ca0f67f8 --- /dev/null +++ b/src/test/ui/issues/issue-17718-patterns.rs @@ -0,0 +1,12 @@ +static A1: usize = 1; +static mut A2: usize = 1; +const A3: usize = 1; + +fn main() { + match 1 { + A1 => {} //~ ERROR: match bindings cannot shadow statics + A2 => {} //~ ERROR: match bindings cannot shadow statics + A3 => {} + _ => {} + } +} |