E0106 "missing lifetime specifier" should be omitted when the signature is incorrect in an impl
(E0186)
#135659
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
When the function is a trait associated function, the signature must match (or refine) the trait’s, so E0106 and any other errors that would propose changes to the signature are misleading or at least not nearly as relevant as E0186 (or E0050 or E0053 or any other such mismatch). Therefore, they should be hidden.
This is particularly important for situations involving a missing
self
parameter, because (in my personal experience) it’s easy to forget to writeself
in the parameter list.Rust Version
The text was updated successfully, but these errors were encountered: