about summary refs log tree commit diff
path: root/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs
blob: e5adf15396549ae4d41a0e28284327d652f4f8d9 (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] {
        [..] => {}
    }
}