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.
and
and
and
these should all warn that the named lifetimes are equal to some other named lifetime and should be removed.