]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0277]: a value of type `Vec<f64>` cannot be built from an iterator over elements of type `&f64` |
dfeec247 XL |
2 | --> $DIR/issue-66923-show-error-for-correct-call.rs:8:39 |
3 | | | |
4 | LL | let x2: Vec<f64> = x1.into_iter().collect(); | |
1b1a35ee | 5 | | ^^^^^^^ value of type `Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>` |
dfeec247 | 6 | | |
1b1a35ee | 7 | = help: the trait `FromIterator<&f64>` is not implemented for `Vec<f64>` |
04454e1e | 8 | = help: the trait `FromIterator<T>` is implemented for `Vec<T>` |
3c0e092e XL |
9 | note: required by a bound in `collect` |
10 | --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | |
11 | | | |
12 | LL | fn collect<B: FromIterator<Self::Item>>(self) -> B | |
13 | | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect` | |
dfeec247 | 14 | |
1b1a35ee | 15 | error[E0277]: a value of type `Vec<f64>` cannot be built from an iterator over elements of type `&f64` |
dfeec247 XL |
16 | --> $DIR/issue-66923-show-error-for-correct-call.rs:12:29 |
17 | | | |
18 | LL | let x3 = x1.into_iter().collect::<Vec<f64>>(); | |
1b1a35ee | 19 | | ^^^^^^^ value of type `Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>` |
dfeec247 | 20 | | |
1b1a35ee | 21 | = help: the trait `FromIterator<&f64>` is not implemented for `Vec<f64>` |
04454e1e | 22 | = help: the trait `FromIterator<T>` is implemented for `Vec<T>` |
3c0e092e XL |
23 | note: required by a bound in `collect` |
24 | --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | |
25 | | | |
26 | LL | fn collect<B: FromIterator<Self::Item>>(self) -> B | |
27 | | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect` | |
dfeec247 XL |
28 | |
29 | error: aborting due to 2 previous errors | |
30 | ||
31 | For more information about this error, try `rustc --explain E0277`. |