rust/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs
2023-01-11 09:32:08 +00:00

12 lines
249 B
Rust

// 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] {
[..] => {}
}
}