]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-66923-show-error-for-correct-call.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-66923-show-error-for-correct-call.rs
CommitLineData
dfeec247
XL
1// This test checks that errors are showed for lines with `collect` rather than `push` method.
2
3fn 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}