]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-33941.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-33941.stderr
1 error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`
2   --> $DIR/issue-33941.rs:14:36
3    |
4 LL |     for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch
5    |                                    ^^^^^^ expected tuple, found reference
6    |
7    = note: expected type `(&_, &_)`
8               found type `&_`
9
10 error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`
11   --> $DIR/issue-33941.rs:14:14
12    |
13 LL |     for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch
14    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference
15    |
16    = note: expected type `(&_, &_)`
17               found type `&_`
18    = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
19
20 error: aborting due to 2 previous errors
21
22 For more information about this error, try `rustc --explain E0271`.