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