Skip to content

No warning for unused function using impl Trait on beta and nightly #54754

Closed
@jonas-schievink

Description

@jonas-schievink

The following code only warns that f is unused on stable, not on beta or nightly:

trait Trait {}
impl<T> Trait for T {}

fn f() -> impl Trait {}

(apologies if this is a duplicate, but a quick search didn't turn anything up)

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions