Closed
Description
The following code compiles with Stable and Beta but not with Nightly on https://play.rust-lang.org/ as of 2015-10-24:
fn main() {
let mut output = vec![Vec::<i32>::new(); 5];
let input = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
for chunk in input.chunks(5) {
for (i, o) in chunk.iter().zip(output.as_mut()) {
o.push(*i);
}
}
println!("{:?}", output);
}
With Stable and Beta I get the correct output:
[[0, 5, 10], [1, 6, 11], [2, 7, 12], [3, 8, 13], [4, 9]]
With Nightly I get the error message
<anon>:6:13: 6:23 error: the type of this value must be known in this context
<anon>:6 o.push(*i);