|  | 
| 1 | 1 | error: usage of `FromIterator::from_iter` | 
| 2 |  | -  --> $DIR/from_iter_instead_of_collect.rs:11:13 | 
|  | 2 | +  --> $DIR/from_iter_instead_of_collect.rs:19:9 | 
| 3 | 3 |    | | 
| 4 |  | -LL |     let _ = Vec::from_iter(iter_expr); | 
| 5 |  | -   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `iter_expr.collect::<Vec<_>>()` | 
|  | 4 | +LL |         <Self as FromIterator<bool>>::from_iter(iter.into_iter().copied()) | 
|  | 5 | +   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `iter.into_iter().copied().collect::<Self>()` | 
| 6 | 6 |    | | 
| 7 | 7 |    = note: `-D clippy::from-iter-instead-of-collect` implied by `-D warnings` | 
| 8 | 8 | 
 | 
| 9 | 9 | error: usage of `FromIterator::from_iter` | 
| 10 |  | -  --> $DIR/from_iter_instead_of_collect.rs:13:13 | 
|  | 10 | +  --> $DIR/from_iter_instead_of_collect.rs:25:13 | 
|  | 11 | +   | | 
|  | 12 | +LL |     let _ = Vec::from_iter(iter_expr); | 
|  | 13 | +   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `iter_expr.collect::<Vec<_>>()` | 
|  | 14 | + | 
|  | 15 | +error: usage of `FromIterator::from_iter` | 
|  | 16 | +  --> $DIR/from_iter_instead_of_collect.rs:27:13 | 
| 11 | 17 |    | | 
| 12 | 18 | LL |     let _ = HashMap::<usize, &i8>::from_iter(vec![5, 5, 5, 5].iter().enumerate()); | 
| 13 | 19 |    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `vec![5, 5, 5, 5].iter().enumerate().collect::<HashMap<usize, &i8>>()` | 
| 14 | 20 | 
 | 
| 15 | 21 | error: usage of `FromIterator::from_iter` | 
| 16 |  | -  --> $DIR/from_iter_instead_of_collect.rs:18:19 | 
|  | 22 | +  --> $DIR/from_iter_instead_of_collect.rs:32:19 | 
| 17 | 23 |    | | 
| 18 | 24 | LL |     assert_eq!(a, Vec::from_iter(0..3)); | 
| 19 | 25 |    |                   ^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `(0..3).collect::<Vec<_>>()` | 
| 20 | 26 | 
 | 
| 21 | 27 | error: usage of `FromIterator::from_iter` | 
| 22 |  | -  --> $DIR/from_iter_instead_of_collect.rs:19:19 | 
|  | 28 | +  --> $DIR/from_iter_instead_of_collect.rs:33:19 | 
| 23 | 29 |    | | 
| 24 | 30 | LL |     assert_eq!(a, Vec::<i32>::from_iter(0..3)); | 
| 25 | 31 |    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `(0..3).collect::<Vec<i32>>()` | 
| 26 | 32 | 
 | 
| 27 | 33 | error: usage of `FromIterator::from_iter` | 
| 28 |  | -  --> $DIR/from_iter_instead_of_collect.rs:21:17 | 
|  | 34 | +  --> $DIR/from_iter_instead_of_collect.rs:35:17 | 
| 29 | 35 |    | | 
| 30 | 36 | LL |     let mut b = VecDeque::from_iter(0..3); | 
| 31 | 37 |    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `(0..3).collect::<VecDeque<_>>()` | 
| 32 | 38 | 
 | 
| 33 | 39 | error: usage of `FromIterator::from_iter` | 
| 34 |  | -  --> $DIR/from_iter_instead_of_collect.rs:24:17 | 
|  | 40 | +  --> $DIR/from_iter_instead_of_collect.rs:38:17 | 
| 35 | 41 |    | | 
| 36 | 42 | LL |     let mut b = VecDeque::<i32>::from_iter(0..3); | 
| 37 | 43 |    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `(0..3).collect::<VecDeque<i32>>()` | 
| 38 | 44 | 
 | 
| 39 | 45 | error: usage of `FromIterator::from_iter` | 
| 40 |  | -  --> $DIR/from_iter_instead_of_collect.rs:29:21 | 
|  | 46 | +  --> $DIR/from_iter_instead_of_collect.rs:43:21 | 
| 41 | 47 |    | | 
| 42 | 48 | LL |         let mut b = collections::VecDeque::<i32>::from_iter(0..3); | 
| 43 | 49 |    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `(0..3).collect::<collections::VecDeque<i32>>()` | 
| 44 | 50 | 
 | 
| 45 | 51 | error: usage of `FromIterator::from_iter` | 
| 46 |  | -  --> $DIR/from_iter_instead_of_collect.rs:34:14 | 
|  | 52 | +  --> $DIR/from_iter_instead_of_collect.rs:48:14 | 
| 47 | 53 |    | | 
| 48 | 54 | LL |     let bm = BTreeMap::from_iter(values.iter().cloned()); | 
| 49 | 55 |    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `values.iter().cloned().collect::<BTreeMap<_, _>>()` | 
| 50 | 56 | 
 | 
| 51 | 57 | error: usage of `FromIterator::from_iter` | 
| 52 |  | -  --> $DIR/from_iter_instead_of_collect.rs:35:19 | 
|  | 58 | +  --> $DIR/from_iter_instead_of_collect.rs:49:19 | 
| 53 | 59 |    | | 
| 54 | 60 | LL |     let mut bar = BTreeMap::from_iter(bm.range(0..2)); | 
| 55 | 61 |    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `bm.range(0..2).collect::<BTreeMap<_, _>>()` | 
| 56 | 62 | 
 | 
| 57 | 63 | error: usage of `FromIterator::from_iter` | 
| 58 |  | -  --> $DIR/from_iter_instead_of_collect.rs:38:19 | 
|  | 64 | +  --> $DIR/from_iter_instead_of_collect.rs:52:19 | 
| 59 | 65 |    | | 
| 60 | 66 | LL |     let mut bts = BTreeSet::from_iter(0..3); | 
| 61 | 67 |    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `(0..3).collect::<BTreeSet<_>>()` | 
| 62 | 68 | 
 | 
| 63 | 69 | error: usage of `FromIterator::from_iter` | 
| 64 |  | -  --> $DIR/from_iter_instead_of_collect.rs:42:17 | 
|  | 70 | +  --> $DIR/from_iter_instead_of_collect.rs:56:17 | 
| 65 | 71 |    | | 
| 66 | 72 | LL |         let _ = collections::BTreeSet::from_iter(0..3); | 
| 67 | 73 |    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `(0..3).collect::<collections::BTreeSet<_>>()` | 
| 68 | 74 | 
 | 
| 69 | 75 | error: usage of `FromIterator::from_iter` | 
| 70 |  | -  --> $DIR/from_iter_instead_of_collect.rs:43:17 | 
|  | 76 | +  --> $DIR/from_iter_instead_of_collect.rs:57:17 | 
| 71 | 77 |    | | 
| 72 | 78 | LL |         let _ = collections::BTreeSet::<u32>::from_iter(0..3); | 
| 73 | 79 |    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `(0..3).collect::<collections::BTreeSet<u32>>()` | 
| 74 | 80 | 
 | 
| 75 | 81 | error: usage of `FromIterator::from_iter` | 
| 76 |  | -  --> $DIR/from_iter_instead_of_collect.rs:46:15 | 
|  | 82 | +  --> $DIR/from_iter_instead_of_collect.rs:60:15 | 
| 77 | 83 |    | | 
| 78 | 84 | LL |     for _i in Vec::from_iter([1, 2, 3].iter()) {} | 
| 79 | 85 |    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `[1, 2, 3].iter().collect::<Vec<_>>()` | 
| 80 | 86 | 
 | 
| 81 | 87 | error: usage of `FromIterator::from_iter` | 
| 82 |  | -  --> $DIR/from_iter_instead_of_collect.rs:47:15 | 
|  | 88 | +  --> $DIR/from_iter_instead_of_collect.rs:61:15 | 
| 83 | 89 |    | | 
| 84 | 90 | LL |     for _i in Vec::<&i32>::from_iter([1, 2, 3].iter()) {} | 
| 85 | 91 |    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `[1, 2, 3].iter().collect::<Vec<&i32>>()` | 
| 86 | 92 | 
 | 
| 87 |  | -error: aborting due to 14 previous errors | 
|  | 93 | +error: aborting due to 15 previous errors | 
| 88 | 94 | 
 | 
0 commit comments