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
444 B
Rust
Raw Normal View History

//@ compile-flags: -Zdeduplicate-diagnostics=yes
2022-03-21 03:02:18 +08:00
use std::collections::HashMap;
fn main() {
2022-12-14 07:52:16 +08: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 `(&_, &_)`
}