]>
Commit | Line | Data |
---|---|---|
dfeec247 XL |
1 | // This test checks that errors are showed for lines with `collect` rather than `push` method. |
2 | ||
3 | fn main() { | |
4 | let v = vec![1_f64, 2.2_f64]; | |
5 | let mut fft: Vec<Vec<f64>> = vec![]; | |
6 | ||
7 | let x1: &[f64] = &v; | |
8 | let x2: Vec<f64> = x1.into_iter().collect(); | |
9 | //~^ ERROR a value of type | |
10 | fft.push(x2); | |
11 | ||
12 | let x3 = x1.into_iter().collect::<Vec<f64>>(); | |
13 | //~^ ERROR a value of type | |
14 | fft.push(x3); | |
15 | } |