2 // compile-flags: -C opt-level=3
3 // min-llvm-version: 11.0
4 // error-pattern: index out of bounds: the len is 0 but the index is 16777216
5 // ignore-wasm no panic or subprocess support
6 // ignore-emscripten no panic or subprocess support
9 let mut arr = vec![vec![0u8; 3]];
12 for arr_ref in arr.iter_mut() {
16 let iterator = std::iter::repeat(0).take(x);
18 iterator.for_each(|_| {
23 let b = (y + 1) * x - 1;
24 let slice = &mut arr_ref[a..b];