rust/tests/ui/issues/issue-33941.rs

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

10 lines
443 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-12-13 17:52:16 -06:00
for _ in HashMap::new().iter().cloned() {} //~ ERROR expected `Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
//~^ ERROR expected `Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
//~| ERROR expected `Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
}