rust/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
249 B
Rust
Raw Normal View History

2019-11-16 10:43:55 -06:00
// check-pass
2019-12-29 18:37:14 -06:00
// This used to cause a stack overflow during exhaustiveness checking in the compiler.
2019-11-16 10:43:55 -06:00
fn main() {
const LARGE_SIZE: usize = 1024 * 1024;
let [..] = [0u8; LARGE_SIZE];
match [0u8; LARGE_SIZE] {
[..] => {}
}
}