1 error[E0277]: a value of type `Vec<f64>` cannot be built from an iterator over elements of type `&f64`
2 --> $DIR/issue-66923-show-error-for-correct-call.rs:8:39
4 LL | let x2: Vec<f64> = x1.into_iter().collect();
5 | ^^^^^^^ value of type `Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
7 = help: the trait `FromIterator<&f64>` is not implemented for `Vec<f64>`
8 = help: the trait `FromIterator<T>` is implemented for `Vec<T>`
9 note: the method call chain might not have had the expected associated types
10 --> $DIR/issue-66923-show-error-for-correct-call.rs:8:27
12 LL | let x1: &[f64] = &v;
13 | -- this expression has type `&Vec<f64>`
14 LL | let x2: Vec<f64> = x1.into_iter().collect();
15 | ^^^^^^^^^^^ `Iterator::Item` is `&f64` here
16 note: required by a bound in `collect`
17 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
19 error[E0277]: a value of type `Vec<f64>` cannot be built from an iterator over elements of type `&f64`
20 --> $DIR/issue-66923-show-error-for-correct-call.rs:12:29
22 LL | let x3 = x1.into_iter().collect::<Vec<f64>>();
23 | ^^^^^^^ value of type `Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
25 = help: the trait `FromIterator<&f64>` is not implemented for `Vec<f64>`
26 = help: the trait `FromIterator<T>` is implemented for `Vec<T>`
27 note: the method call chain might not have had the expected associated types
28 --> $DIR/issue-66923-show-error-for-correct-call.rs:12:17
30 LL | let x1: &[f64] = &v;
31 | -- this expression has type `&Vec<f64>`
33 LL | let x3 = x1.into_iter().collect::<Vec<f64>>();
34 | ^^^^^^^^^^^ `Iterator::Item` is `&f64` here
35 note: required by a bound in `collect`
36 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
38 error: aborting due to 2 previous errors
40 For more information about this error, try `rustc --explain E0277`.