]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-33941.stderr
Rollup merge of #105676 - notriddle:notriddle/impl-docblock, r=GuillaumeGomez
[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 error[E0271]: expected `std::collections::hash_map::Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
13   --> $DIR/issue-33941.rs:6:14
14    |
15 LL |     for _ in HashMap::new().iter().cloned() {}
16    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference
17    |
18    = note:  expected tuple `(&_, &_)`
19            found reference `&_`
20    = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `Iterator`
21    = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `IntoIterator`
22
23 error[E0271]: expected `std::collections::hash_map::Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
24   --> $DIR/issue-33941.rs:6:14
25    |
26 LL |     for _ in HashMap::new().iter().cloned() {}
27    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference
28    |
29    = note:  expected tuple `(&_, &_)`
30            found reference `&_`
31    = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `Iterator`
32
33 error: aborting due to 3 previous errors
34
35 For more information about this error, try `rustc --explain E0271`.