Skip to content

needless_lifetimes: false positive with async fn #3988

Closed
@Nemo157

Description

@Nemo157

Minimal repro:

#![feature(futures_api)]

pub struct Foo;
impl Foo {
    pub async fn foo(&mut self) {
    }
}

(playground), gives (with clippy 0.0.212 (2019-04-14 fbb3a47))

warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
 --> src/lib.rs:5:5
  |
5 | /     pub async fn foo(&mut self) {
6 | |     }
  | |_____^
  |
  = note: #[warn(clippy::needless_lifetimes)] on by default

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thingT-async-awaitType: Issues related to async/awaitgood first issueThese issues are a good way to get started with Clippy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions