Remove FIXME comments about Cfg::parse in librustdoc cfg handling#147298
Remove FIXME comments about Cfg::parse in librustdoc cfg handling#147298GuillaumeGomez wants to merge 1 commit intorust-lang:mainfrom
Cfg::parse in librustdoc cfg handling#147298Conversation
There was a problem hiding this comment.
No, this is a FIXME for a class of bugs reported by me in #138907 (comment) which still exist:
#![feature(doc_cfg)]
#![doc(auto_cfg(hide(foo = 0), show(foo = 0)))]Does not lead to any errors under rustdoc or rustc; tested on latest master.
(1) rustc's check_attr incorrectly claims that this attribute is well-formed since the checks are incomplete. (2) rustdoc rightly fails to parse it as a Cfg but suppresses any errors.
|
Ah interesting, so seems like some cases are actually not handled. The FIXME still needs to be removed but it also means I need to improve the check in |
|
Well, I don't have everything in my mental cache anymore but it's possible that the example I gave is not the only kind of bug there is. We need to be "certain" that rustdoc checks are at least as strict as rustc's checks. Feel free to move the FIXME from rustdoc to rustc/check_attr if you've checked that |
|
What I meant is that I'm planning to add the missing checks in |
|
Ah, yea, that's also a possibility ^^' a much better one at that! Thanks, go for it! |
|
So doing this check in PR for this new API is #147097. So for now, I'll mark this PR as blocked. |
|
☔ The latest upstream changes (presumably #149645) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Not needed anymore thanks to #149645. =D |
Follow-up of #138907.
As said in the comment, no need to check the returned value
Cfg::parse, everything is checked upstream and we haverustdoc-uitest(s) to check it.cc @fmease
r? lolbinarycat