]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-33941.stderr
Rollup merge of #105464 - nbdd0121:hir, r=compiler-errors
[rust.git] / src / test / ui / issues / issue-33941.stderr
1 error[E0271]: expected `std::collections::hash_map::Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
2   --> $DIR/issue-33941.rs:6:36
3    |
4 LL |     for _ in HashMap::new().iter().cloned() {}
5    |                                    ^^^^^^ expected reference, found tuple
6    |
7    = note: expected reference `&_`
8                   found tuple `(&_, &_)`
9 note: required by a bound in `cloned`
10   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
11    |
12 LL |         Self: Sized + Iterator<Item = &'a T>,
13    |                                ^^^^^^^^^^^^ required by this bound in `Iterator::cloned`
14
15 error[E0271]: expected `std::collections::hash_map::Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
16   --> $DIR/issue-33941.rs:6:14
17    |
18 LL |     for _ in HashMap::new().iter().cloned() {}
19    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference
20    |
21    = note:  expected tuple `(&_, &_)`
22            found reference `&_`
23    = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `Iterator`
24    = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `IntoIterator`
25
26 error[E0271]: expected `std::collections::hash_map::Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
27   --> $DIR/issue-33941.rs:6:14
28    |
29 LL |     for _ in HashMap::new().iter().cloned() {}
30    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference
31    |
32    = note:  expected tuple `(&_, &_)`
33            found reference `&_`
34    = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `Iterator`
35
36 error: aborting due to 3 previous errors
37
38 For more information about this error, try `rustc --explain E0271`.