For example,
#![feature(slice_patterns)]
const C0: &'static [u8] = b"\x00";
fn main() {
let x: &[u8] = &[0];
match x { // this code compiles
&[] => {},
&[1..=255] => {},
C0 => {}, //~ unreachable pattern (no it's not)
&[_, _, ..] => {}
}
}
cc @oli-obk
For example,
cc @oli-obk