summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs
blob: 5b0482de2200e9d7e26e2648827dfca88acffe7f (plain)
1
2
3
4
5
6
7
8
9
10
11
// check-pass

// This used to cause a stack overflow during exhaustiveness checking in the compiler.

fn main() {
    const LARGE_SIZE: usize = 1024 * 1024;
    let [..] = [0u8; LARGE_SIZE];
    match [0u8; LARGE_SIZE] {
        [..] => {}
    }
}