Uh oh!
There was an error while loading. Please reload this page.
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 into
Conversation
rust-highfive
commented
May 11, 2022
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.
cjgillot
commented
May 11, 2022
I don't understand your comment. The md file has been removed for other errors that are not emitted any more, hasn't it? |
GuillaumeGomez
commented
May 11, 2022
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. |
GuillaumeGomez
commented
May 11, 2022
Ah bingo, my CI check worked. :) |
GuillaumeGomez
commented
May 11, 2022
Thanks! It's possible that the test will fail because of the |
petrochenkov
commented
May 13, 2022
How it happens exactly? What serves as a replacement for |
cjgillot
commented
May 14, 2022
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". |
bors
commented
May 20, 2022
☔ 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