rust/tests/ui/from_iter_instead_of_collect.stderr

17 lines
718 B
Plaintext
Raw Normal View History

2020-10-01 17:04:19 +00:00
error: usage of `FromIterator::from_iter`
2020-10-01 16:34:36 +00:00
--> $DIR/from_iter_instead_of_collect.rs:8:5
|
2020-10-01 16:04:05 +00:00
LL | Vec::from_iter(iter_expr);
2020-10-01 17:04:19 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `iter_expr.collect()`
|
= note: `-D clippy::from-iter-instead-of-collect` implied by `-D warnings`
2020-10-01 17:04:19 +00:00
error: usage of `FromIterator::from_iter`
2020-10-01 16:04:05 +00:00
--> $DIR/from_iter_instead_of_collect.rs:10:5
|
2020-10-01 16:04:05 +00:00
LL | HashMap::<usize, &i8>::from_iter(vec![5, 5, 5, 5].iter().enumerate());
2020-10-01 17:04:19 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `vec![5, 5, 5, 5].iter().enumerate().collect()`
error: aborting due to 2 previous errors