From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../usefulness/match-byte-array-patterns.rs | 55 ---------------------- 1 file changed, 55 deletions(-) delete mode 100644 src/test/ui/pattern/usefulness/match-byte-array-patterns.rs (limited to 'src/test/ui/pattern/usefulness/match-byte-array-patterns.rs') diff --git a/src/test/ui/pattern/usefulness/match-byte-array-patterns.rs b/src/test/ui/pattern/usefulness/match-byte-array-patterns.rs deleted file mode 100644 index 9b6c8bd55..000000000 --- a/src/test/ui/pattern/usefulness/match-byte-array-patterns.rs +++ /dev/null @@ -1,55 +0,0 @@ -#![deny(unreachable_patterns)] - -fn main() { - let buf = &[0, 1, 2, 3]; - - match buf { - b"AAAA" => {}, - &[0x41, 0x41, 0x41, 0x41] => {} //~ ERROR unreachable pattern - _ => {} - } - - match buf { - &[0x41, 0x41, 0x41, 0x41] => {} - b"AAAA" => {}, //~ ERROR unreachable pattern - _ => {} - } - - match buf { - &[_, 0x41, 0x41, 0x41] => {}, - b"AAAA" => {}, //~ ERROR unreachable pattern - _ => {} - } - - match buf { - &[0x41, .., 0x41] => {} - b"AAAA" => {}, //~ ERROR unreachable pattern - _ => {} - } - - let buf: &[u8] = buf; - - match buf { - b"AAAA" => {}, - &[0x41, 0x41, 0x41, 0x41] => {} //~ ERROR unreachable pattern - _ => {} - } - - match buf { - &[0x41, 0x41, 0x41, 0x41] => {} - b"AAAA" => {}, //~ ERROR unreachable pattern - _ => {} - } - - match buf { - &[_, 0x41, 0x41, 0x41] => {}, - b"AAAA" => {}, //~ ERROR unreachable pattern - _ => {} - } - - match buf { - &[0x41, .., 0x41] => {} - b"AAAA" => {}, //~ ERROR unreachable pattern - _ => {} - } -} -- cgit v1.2.3