From bcdbe942e108e47ffa712fa44ad9b251c53c105b Mon Sep 17 00:00:00 2001 From: Andrew Cann Date: Tue, 29 Nov 2016 15:10:26 +0800 Subject: Make is_useful handle empty types properly --- src/test/compile-fail/match-byte-array-patterns.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/test/compile-fail/match-byte-array-patterns.rs') 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" => {} - } } -- cgit 1.4.1-3-g733a5