Closed
Description
Now that support for '_
has landed, as part of #44524, it would be good to start linting for cases where it ought to be used. In particular, we wish to warn if there is a struct with lifetime parameters that are elided:
struct Foo<'a> { x: &'a u32 }
fn foo(x: &Foo) {
// ^^^ warning: hidden lifetime parameters are deprecated, try `Foo<'_>`
}
This should be fairly straightforward to do during resolve_lifetimes
.