diff options
| author | Nadrieril <nadrieril@gmail.com> | 2019-09-28 16:05:38 +0200 |
|---|---|---|
| committer | Nadrieril <nadrieril@gmail.com> | 2019-10-27 21:20:26 +0000 |
| commit | 09f9947ebc68a8199c3dff8607a41571c48cc377 (patch) | |
| tree | fb81c258de9902ea813c24c5ca08bcce9817a4bb /src/test/ui/structs/struct-pattern-match-useless.rs | |
| parent | 0f677c65e867d93a47ccbaeaf6e6725cde8c5ff6 (diff) | |
| download | rust-09f9947ebc68a8199c3dff8607a41571c48cc377.tar.gz rust-09f9947ebc68a8199c3dff8607a41571c48cc377.zip | |
Gather together usefulness tests
I took most tests that were testing only for match exhaustiveness, pattern refutability or match arm reachability, and put them in the same test folder.
Diffstat (limited to 'src/test/ui/structs/struct-pattern-match-useless.rs')
| -rw-r--r-- | src/test/ui/structs/struct-pattern-match-useless.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/test/ui/structs/struct-pattern-match-useless.rs b/src/test/ui/structs/struct-pattern-match-useless.rs deleted file mode 100644 index 93f0a931761..00000000000 --- a/src/test/ui/structs/struct-pattern-match-useless.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![deny(unreachable_patterns)] - -struct Foo { - x: isize, - y: isize, -} - -pub fn main() { - let a = Foo { x: 1, y: 2 }; - match a { - Foo { x: _x, y: _y } => (), - Foo { .. } => () //~ ERROR unreachable pattern - } - -} |
