diff options
| author | Andrew Cann <shum@canndrew.org> | 2016-11-29 15:10:26 +0800 |
|---|---|---|
| committer | Andrew Cann <shum@canndrew.org> | 2017-01-03 15:31:46 +0800 |
| commit | bcdbe942e108e47ffa712fa44ad9b251c53c105b (patch) | |
| tree | 8afed02b3f00112fe4aed144a0209eacecdf1320 /src/test/compile-fail/match-byte-array-patterns.rs | |
| parent | 9ad20442e8af42815fde41c03188764ac516cf18 (diff) | |
| download | rust-bcdbe942e108e47ffa712fa44ad9b251c53c105b.tar.gz rust-bcdbe942e108e47ffa712fa44ad9b251c53c105b.zip | |
Make is_useful handle empty types properly
Diffstat (limited to 'src/test/compile-fail/match-byte-array-patterns.rs')
| -rw-r--r-- | src/test/compile-fail/match-byte-array-patterns.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/test/compile-fail/match-byte-array-patterns.rs b/src/test/compile-fail/match-byte-array-patterns.rs index 86323656b87..1ff07eae1c9 100644 --- a/src/test/compile-fail/match-byte-array-patterns.rs +++ b/src/test/compile-fail/match-byte-array-patterns.rs @@ -9,6 +9,7 @@ // except according to those terms. #![feature(advanced_slice_patterns, slice_patterns)] +#![deny(unreachable_patterns)] fn main() { let buf = &[0, 1, 2, 3]; @@ -37,10 +38,6 @@ fn main() { _ => {} } - match buf { //~ ERROR non-exhaustive - b"AAAA" => {} - } - let buf: &[u8] = buf; match buf { @@ -66,8 +63,4 @@ fn main() { b"AAAA" => {}, //~ ERROR unreachable pattern _ => {} } - - match buf { //~ ERROR non-exhaustive - b"AAAA" => {} - } } |
