]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-33941.stderr
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[rust.git] / src / test / ui / issues / issue-33941.stderr
1 error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as Iterator>::Item == &_`
2   --> $DIR/issue-33941.rs:4:36
3    |
4 LL |     for _ in HashMap::new().iter().cloned() {}
5    |                                    ^^^^^^ expected tuple, found reference
6    |
7    = note:  expected tuple `(&_, &_)`
8            found reference `&_`
9
10 error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as Iterator>::Item == &_`
11   --> $DIR/issue-33941.rs:4:14
12    |
13 LL |     for _ in HashMap::new().iter().cloned() {}
14    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found tuple
15    |
16    = note: expected reference `&_`
17                   found tuple `(&_, &_)`
18    = note: required because of the requirements on the impl of `Iterator` for `Cloned<std::collections::hash_map::Iter<'_, _, _>>`
19    = note: required because of the requirements on the impl of `IntoIterator` for `Cloned<std::collections::hash_map::Iter<'_, _, _>>`
20 note: required by `into_iter`
21   --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
22    |
23 LL |     fn into_iter(self) -> Self::IntoIter;
24    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25
26 error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as Iterator>::Item == &_`
27   --> $DIR/issue-33941.rs:4:14
28    |
29 LL |     for _ in HashMap::new().iter().cloned() {}
30    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found tuple
31    |
32    = note: expected reference `&_`
33                   found tuple `(&_, &_)`
34    = note: required because of the requirements on the impl of `Iterator` for `Cloned<std::collections::hash_map::Iter<'_, _, _>>`
35 note: required by `std::iter::Iterator::next`
36   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
37    |
38 LL |     fn next(&mut self) -> Option<Self::Item>;
39    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40
41 error: aborting due to 3 previous errors
42
43 For more information about this error, try `rustc --explain E0271`.