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 }})

Urgau

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

r? @GuillaumeGomez

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-rustdoc

Relevant to the rustdoc team, which will review and decide on the PR/issue.

label

Feb 19, 2022

@Urgau

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"

@GuillaumeGomez

@camelid

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

Feb 22, 2022

@bors

@Urgau

@Urgau

GuillaumeGomez

@GuillaumeGomez

@bors

📌 Commit a31ae15 has been approved by GuillaumeGomez

@bors 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

Feb 25, 2022

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Feb 25, 2022

@matthiaskrgr

…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

Feb 25, 2022

@bors

…askrgr

Rollup of 4 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

@Urgau Urgau mentioned this pull request

Feb 25, 2022

@Urgau Urgau mentioned this pull request

Feb 26, 2022

bors added a commit to rust-lang/cargo that referenced this pull request

Feb 27, 2022

@bors

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 Urgau deleted the rustdoc-check-cfg branch

May 5, 2023 16:46

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-rustdoc

Relevant to the rustdoc team, which will review and decide on the PR/issue.