1 #![deny(unreachable_patterns)]
4 let s = &[0x00; 4][..]; //Slice of any value
5 const MAGIC_TEST: &[u8] = b"TEST"; //Const slice to pattern match with
8 [0x00, 0x00, 0x00, 0x00] => (),
9 [84, 69, 83, 84] => (), //~ ERROR unreachable pattern
13 [0x00, 0x00, 0x00, 0x00] => (),
15 [84, 69, 83, 84] => (), //~ ERROR unreachable pattern
19 [0x00, 0x00, 0x00, 0x00] => (),
20 [84, 69, 83, 84] => (),
21 MAGIC_TEST => (), //~ ERROR unreachable pattern
24 const FOO: [u8; 1] = [4];
28 FOO => (), //~ ERROR unreachable pattern
31 const BAR: &[u8; 1] = &[4];
35 BAR => (), //~ ERROR unreachable pattern
40 const BOO: &[u8; 0] = &[];
43 BOO => (), //~ ERROR unreachable pattern
44 b"" => (), //~ ERROR unreachable pattern
45 _ => (), //~ ERROR unreachable pattern