Report "missing lifetime specifier" when an anonymous lifetime is used in bounds#96953
Report "missing lifetime specifier" when an anonymous lifetime is used in bounds#96953cjgillot wants to merge 1 commit intorust-lang:masterfrom
Conversation
|
Some changes occurred in diagnostic error codes |
GuillaumeGomez
left a comment
There was a problem hiding this comment.
Please don't remove error code explanations! There are examples where they are not emitted anymore. Please do the same for this error code as well.
|
I don't understand your comment. The md file has been removed for other errors that are not emitted any more, hasn't it? |
|
It wasn't supposed to. I realized that a few months ago (maybe more than a year now, not sure...). The point is: if people with older rustc version look at newer rust error code page, they will not see their error anymore. Just update the md file like this one. |
|
Ah bingo, my CI check worked. :) |
|
Thanks! It's possible that the test will fail because of the |
How it happens exactly? What serves as a replacement for |
|
This was used for where predicates, and generic parameters. In these cases, there is no resolution for the elided lifetime, so we correctly print "missing lifetime specifier". |
|
☔ The latest upstream changes (presumably #96833) made this pull request unmergeable. Please resolve the merge conflicts. |
Both diagnostics pretty much do the same thing: report erroneous lifetime elision.
The "missing lifetime specifier" diagnostic has better diagnostics, as it suggests adding a named lifetime parameter.
This change does not accept more code, it just changes the diagnostic.
r? @petrochenkov