Closed
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.
Metadata
Metadata
Assignees
Labels
Area: Lifetimes / regionsArea: Lints (warnings about flaws in source code) such as unused_mut.Category: A feature request, i.e: not implemented / a PR.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.