rust/src/test/ui/pattern/issue-53820-slice-pattern-large-array.rs

12 lines
218 B
Rust
Raw Normal View History

2019-11-16 16:43:55 +00:00
// check-pass
// This used to cause a stack overflow in the compiler.
2019-11-16 16:43:55 +00:00
fn main() {
const LARGE_SIZE: usize = 1024 * 1024;
let [..] = [0u8; LARGE_SIZE];
match [0u8; LARGE_SIZE] {
[..] => {}
}
}