Skip to content

Commit

Permalink
Rename tests and add short test description
Browse files Browse the repository at this point in the history
  • Loading branch information
VirrageS committed Dec 3, 2019
1 parent 4cc7ef5 commit 0abb988
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// This test checks that errors are showed for lines with `collect` rather than `push` method.

fn main() {
let v = vec![1_f64, 2.2_f64];
let mut fft: Vec<Vec<f64>> = vec![];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0277]: a collection of type `std::vec::Vec<f64>` cannot be built from an iterator over elements of type `&f64`
--> $DIR/issue-66923.rs:6:39
--> $DIR/issue-66923-show-error-for-correct-call.rs:8:39
|
LL | let x2: Vec<f64> = x1.into_iter().collect();
| ^^^^^^^ a collection of type `std::vec::Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
|
= help: the trait `std::iter::FromIterator<&f64>` is not implemented for `std::vec::Vec<f64>`

error[E0277]: a collection of type `std::vec::Vec<f64>` cannot be built from an iterator over elements of type `&f64`
--> $DIR/issue-66923.rs:10:29
--> $DIR/issue-66923-show-error-for-correct-call.rs:12:29
|
LL | let x3 = x1.into_iter().collect::<Vec<f64>>();
| ^^^^^^^ a collection of type `std::vec::Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
Expand Down

0 comments on commit 0abb988

Please sign in to comment.