rustc/tests/ui/pattern/usefulness/match-byte-array-patterns-2.rs
2023-08-02 10:33:26 +02:00

14 lines
210 B
Rust

fn main() {
let buf = &[0, 1, 2, 3];
match buf { //~ ERROR non-exhaustive
b"AAAA" => {}
}
let buf: &[u8] = buf;
match buf { //~ ERROR non-exhaustive
b"AAAA" => {}
}
}