error: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`:
expected tuple,
found &-ptr [--explain E0271]
--> <anon>:4:36
4 |> for _ in HashMap::new().iter().cloned() { }
|> ^^^^^^
error: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`:
expected tuple,
found &-ptr [--explain E0271]
--> <anon>:4:5
4 |> for _ in HashMap::new().iter().cloned() { }
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
error: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`:
expected tuple,
found &-ptr [--explain E0271]
--> <anon>:4:5
4 |> for _ in HashMap::new().iter().cloned() { }
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
error: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`:
expected tuple,
found &-ptr [--explain E0271]
--> <anon>:4:5
4 |> for _ in HashMap::new().iter().cloned() { }
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
note: required by `std::iter::IntoIterator::into_iter`
error: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`:
expected tuple,
found &-ptr [--explain E0271]
--> <anon>:4:5
4 |> for _ in HashMap::new().iter().cloned() { }
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
note: required by `std::iter::IntoIterator::into_iter`
error: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`:
expected tuple,
found &-ptr [--explain E0271]
--> <anon>:4:5
4 |> for _ in HashMap::new().iter().cloned() { }
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
note: required because of the requirements on the impl of `std::iter::IntoIterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
error: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`:
expected tuple,
found &-ptr [--explain E0271]
--> <anon>:4:5
4 |> for _ in HashMap::new().iter().cloned() { }
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
error: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`:
expected tuple,
found &-ptr [--explain E0271]
--> <anon>:4:5
4 |> for _ in HashMap::new().iter().cloned() { }
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
note: required by `std::iter::Iterator::next`
error: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`:
expected tuple,
found &-ptr [--explain E0271]
--> <anon>:4:5
4 |> for _ in HashMap::new().iter().cloned() { }
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
error: aborting due to 9 previous errors
Playpen
.cloned()failing is normal since the iterator's items are(&K, &V)and.cloned()expects&T, but the number of errors is strange.