-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingT-async-awaitType: Issues related to async/awaitType: Issues related to async/awaitgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
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!()
}
}
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingT-async-awaitType: Issues related to async/awaitType: Issues related to async/awaitgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy