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