rust/src/test/ui/issues/issue-33941.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
527 B
Rust
Raw Normal View History

2022-03-20 14:02:18 -05:00
// compile-flags: -Zdeduplicate-diagnostics=yes
use std::collections::HashMap;
fn main() {
2022-08-07 19:13:41 -05:00
for _ in HashMap::new().iter().cloned() {} //~ ERROR expected `std::collections::hash_map::Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
//~^ ERROR expected `std::collections::hash_map::Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
//~| ERROR expected `std::collections::hash_map::Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
}