-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Report "missing lifetime specifier" when an anonymous lifetime is used in bounds #96953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Some changes occurred in diagnostic error codes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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