Closed
Description
Sometimes refactorings can leave behind needlessly generic functions, like in this case:
fn foo<'a>(foo: &'a Foo<'a>) {...}
becomes
type Foo<'a> = &'a FooStruct<'a>;
fn foo<'a>(foo: Foo<'a>) {...}
If the lifetime 'a
is not used anywhere else in foo
, it isn't any different from an anonymous lifetime.