Wire up unstable rustc --check-cfg to rustdoc by Urgau · Pull Request #94154 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation7 Commits2 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
This pull-request wire up the new unstable --check-cfg
option from rustc
to rustdoc
as requested in the pull-request that introduce --check-cfg
.
The motivation was describe in the original PR by @jyn514 who wrote #89346 (comment):
add plumbing to pass --check-cfg from rustdoc (do we want this one?)
It would be useful, I think, it catches issues like cfg(doctst) or something (and in general I would like expansion to match rustc as closely as possible).
(rust-highfive has picked a reviewer for you, use r? to override)
This comment has been minimized.
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
This was a weird! Simply doing this ./x.py test --stage 1 src/test/rustdoc-ui/check-cfg-test.rs
made the test pass but not on CI (what ?).
I had to manually had some extra normalizations (based on other rustdoc test) to make it fail locally. I think it will now pass on CI as well.
// normalize-stderr-test: "src/test/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
I don't have context for this change, but I don't think it's really necessary to discuss it now since it's unstable?
This was referenced
Feb 21, 2022
bors added a commit to rust-lang/cargo that referenced this pull request
📌 Commit a31ae15 has been approved by GuillaumeGomez
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…eGomez
Wire up unstable rustc --check-cfg to rustdoc
This pull-request wire up the new unstable --check-cfg
option from rustc
to rustdoc
as [requested](rust-lang#93915 (comment)) in the pull-request that introduce --check-cfg
.
The motivation was describe in the original PR by @jyn514
who wrote rust-lang#89346 (comment):
add plumbing to pass --check-cfg from rustdoc (do we want this one?)
It would be useful, I think, it catches issues like cfg(doctst) or something (and in general I would like expansion to match rustc as closely as possible).
This was referenced
Feb 25, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request
…askrgr
Rollup of 4 pull requests
Successful merges:
- rust-lang#93850 (Don't ICE when an extern static is too big for the current architecture)
- rust-lang#94154 (Wire up unstable rustc --check-cfg to rustdoc)
- rust-lang#94353 (Fix debug_assert in unused lint pass)
- rust-lang#94366 (Add missing item to release notes)
Failed merges:
r? @ghost
@rustbot
modify labels: rollup
Urgau mentioned this pull request
Urgau mentioned this pull request
bors added a commit to rust-lang/cargo that referenced this pull request
Add -Z check-cfg-features support for rustdoc
This PR is a follow to #10408 where support for compile-time checking of features was implemented for rustc
.
At the time rustdoc
support wasn't yet merged, but now that it has been merged, this pull-request add support for it in the doc
and test --doc
(doctest) mode.
r? @alexcrichton
Urgau deleted the rustdoc-check-cfg branch
Labels
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the rustdoc team, which will review and decide on the PR/issue.