summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs
blob: 54dfa889ee35a8fbc691c9526431a2c28e76ff48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// check-pass

#![deny(unreachable_patterns)]

const C0: &'static [u8] = b"\x00";

fn main() {
    let x: &[u8] = &[0];
    match x {
        &[] => {}
        &[1..=255] => {}
        C0 => {}
        &[_, _, ..] => {}
    }
}