summary refs log tree commit diff
path: root/src/test/ui/match/match-byte-array-patterns-2.rs
blob: a3a47d23bef4c10f895c0fa9a6e9eff6f365d05c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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" => {}
    }
}