2019-12-03 01:20:17 -06:00
|
|
|
// This test checks that errors are showed for lines with `collect` rather than `push` method.
|
|
|
|
|
2019-12-01 06:39:01 -06:00
|
|
|
fn main() {
|
|
|
|
let v = vec![1_f64, 2.2_f64];
|
|
|
|
let mut fft: Vec<Vec<f64>> = vec![];
|
|
|
|
|
|
|
|
let x1: &[f64] = &v;
|
|
|
|
let x2: Vec<f64> = x1.into_iter().collect();
|
2019-12-03 01:20:17 -06:00
|
|
|
//~^ ERROR a value of type
|
2019-12-01 06:39:01 -06:00
|
|
|
fft.push(x2);
|
|
|
|
|
|
|
|
let x3 = x1.into_iter().collect::<Vec<f64>>();
|
2019-12-03 01:20:17 -06:00
|
|
|
//~^ ERROR a value of type
|
2019-12-01 06:39:01 -06:00
|
|
|
fft.push(x3);
|
|
|
|
}
|