rust/tests/ui/issues/issue-33941.rs
2024-03-04 21:06:52 +01:00

9 lines
342 B
Rust

//@ compile-flags: -Zdeduplicate-diagnostics=yes
use std::collections::HashMap;
fn main() {
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 `(&_, &_)`
}