-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
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.
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
.
Metadata
Metadata
Assignees
Labels
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.