summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/match-byte-array-patterns-2.rs
blob: 33468d03fae40338f4b76e7cd28cf0206f2f03e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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" => {}
    }
}