-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
fn foo<'a, 'b>(x: &'a &'b &'a ()) {} // WARN: `'a` and `'b` are equal
and
fn foo<'a: 'b, 'b: 'a>() {} // WARN: `'a` and `'b` are equal
and
struct Foo<T: 'static>(T);
fn bar<'a>(_: Foo<&'a ()>) {} // WARN: replace `'a` with `'static`
and
struct Foo<'a>(&'a ());
impl<'a> Foo<'a> {
fn bar<'b: 'a>(&'b self) {} // WARN: `'a` and `'b` are equal
}
these should all warn that the named lifetimes are equal to some other named lifetime and should be removed.
fmease
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.