about summary refs log tree commit diff
path: root/src/test/compile-fail/match-byte-array-patterns.rs
diff options
context:
space:
mode:
authorAndrew Cann <shum@canndrew.org>2016-11-29 15:10:26 +0800
committerAndrew Cann <shum@canndrew.org>2017-01-03 15:31:46 +0800
commitbcdbe942e108e47ffa712fa44ad9b251c53c105b (patch)
tree8afed02b3f00112fe4aed144a0209eacecdf1320 /src/test/compile-fail/match-byte-array-patterns.rs
parent9ad20442e8af42815fde41c03188764ac516cf18 (diff)
downloadrust-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.rs9
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" => {}
-    }
 }