rust/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs
2023-01-11 09:32:08 +00:00

16 lines
228 B
Rust

// check-pass
#![deny(unreachable_patterns)]
const C0: &'static [u8] = b"\x00";
fn main() {
let x: &[u8] = &[0];
match x {
&[] => {}
&[1..=255] => {}
C0 => {}
&[_, _, ..] => {}
}
}