diff options
Diffstat (limited to 'tests/ui/pattern/usefulness/issue-30240.rs')
-rw-r--r-- | tests/ui/pattern/usefulness/issue-30240.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/pattern/usefulness/issue-30240.rs b/tests/ui/pattern/usefulness/issue-30240.rs new file mode 100644 index 000000000..a0c0d1626 --- /dev/null +++ b/tests/ui/pattern/usefulness/issue-30240.rs @@ -0,0 +1,10 @@ +fn main() { + match "world" { //~ ERROR non-exhaustive patterns: `&_` + "hello" => {} + } + + match "world" { //~ ERROR non-exhaustive patterns: `&_` + ref _x if false => {} + "hello" => {} + } +} |