Skip to content

Spurious unused type alias warning (regression) #41203

Closed
@jseyfried

Description

@jseyfried

This example produced a spurious unused type alias warning:

struct S<T>(T);
type Alias<T> = S<T>;

trait Tr<T> { fn f(&self) {} }
impl<T> Tr<T> for S<T> {}

impl<T> S<T> where Alias<T>: Tr<T> {
    fn g(&self) { self.f() }
}

fn main() {
    S(0).g();
}

Metadata

Metadata

Assignees

Labels

A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions