Closed
Description
They are actually returning a different type than normal methods.
#![feature(async_await)]
#![warn(clippy::should_implement_trait)]
pub struct Foo;
impl Foo {
// actual type: pub fn next(&mut self) -> impl Future<Output = Option<()>>
pub async fn next(&mut self) -> Option<()> { //~ WARN: defining a method called `next` on this type; consider implementing the `std::iter::Iterator` trait or choosing a less ambiguous name
unimplemented!()
}
}