Skip to content

Bad interaction of async functions with unused_lifetimes lint #78522

Closed
@c410-f3r

Description

@c410-f3r

The following shouldn't trigger the lint:

#![forbid(unused_lifetimes)]

pub async fn stuff<'a, I>(_: I) 
where
    I: Iterator<Item = &'a i32>
{
}

Also happens with &'a self or &'a mut self parameters

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitA-lifetimesArea: Lifetimes / regionsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.E-help-wantedCall for participation: Help is requested to fix this issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions