When encountering .iter() on an impl Iterator, suggest removing the method call:
serror[E0599]: no method named `iter` found for opaque type `impl std::iter::Iterator<Item = &AssocItem> + '_` in the current scope
--> compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs:3130:67
|
3130 | if !self.tcx.provided_trait_methods(trait_def_id).iter().any(|method| {
| ^^^^
|
help: there is a method `filter` with a similar name, but with different arguments
--> /rustc/ad726b5063362ec9897ef3d67452fc5606ee70fa/library/core/src/iter/traits/iterator.rs:911:4
This can likely be done generally by looking at every method with that name and seeing if their return type matches the impl Trait we already have.
When encountering
.iter()on animpl Iterator, suggest removing the method call:This can likely be done generally by looking at every method with that name and seeing if their return type matches the
impl Traitwe already have.