Closed
Description
This compiles just fine:
fn x(input: HashSet<usize>) {
for i in input.iter() {}
}
This gives compile time error:
no method named iter
found for type std::collections::hash::set::HashSet<std::collections::hash::set::HashSet<usize>>
in the current scope
fn x(input: HashSet<HashSet<usize>>) {
for i in input.iter() {}
}
I tested this code on multiple versions of rust using play.rust-lang.org and all versions seem to be affected in the same way. I also noticed that using a HashMap results to the same issue, and in both cases not only iter() is gone, but no single method seems to work. (I only tested iter(), capacity() and clear()
)
Metadata
Metadata
Assignees
Labels
No labels