fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0271]: expected `Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)` 2 --> $DIR/issue-33941.rs:6:36 3 | 4LL | for _ in HashMap::new().iter().cloned() {} 5 | ^^^^^^ expected `&_`, found `(&_, &_)` 6 | 7 = note: expected reference `&_` 8 found tuple `(&_, &_)` 9note: the method call chain might not have had the expected associated types 10 --> $DIR/issue-33941.rs:6:29 11 | 12LL | for _ in HashMap::new().iter().cloned() {} 13 | -------------- ^^^^^^ `Iterator::Item` is `(&_, &_)` here 14 | | 15 | this expression has type `HashMap<_, _>` 16note: required by a bound in `cloned` 17 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL 18 19error[E0271]: expected `Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)` 20 --> $DIR/issue-33941.rs:6:14 21 | 22LL | for _ in HashMap::new().iter().cloned() {} 23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(&_, &_)`, found `&_` 24 | 25 = note: expected tuple `(&_, &_)` 26 found reference `&_` 27 = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `Iterator` 28 = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `IntoIterator` 29 30error[E0271]: expected `Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)` 31 --> $DIR/issue-33941.rs:6:14 32 | 33LL | for _ in HashMap::new().iter().cloned() {} 34 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(&_, &_)`, found `&_` 35 | 36 = note: expected tuple `(&_, &_)` 37 found reference `&_` 38 = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `Iterator` 39 40error: aborting due to 3 previous errors 41 42For more information about this error, try `rustc --explain E0271`.