bootstrap: Include feature-gated items in bootstrap tool docs - #161900
bootstrap: Include feature-gated items in bootstrap tool docs#161900Zalathar wants to merge 3 commits into
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
As a follow-up we could also enable this for compiler crates, since a few of them have feature flags to enable nightly-only features when they aren't being used by rust-analyzer. |
|
I would also like to note that this would have been much more annoying without |
This comment has been minimized.
This comment has been minimized.
|
I really want to blanket allow |
|
r? kobzol Note that this will conflict a lot with #161716. In general I'm happy to see most of the code move out of a macro. |
|
Aside: do you find the build_helper/bootstrap docs being present in the nightly rustc docs useful? |
I use the nightly-rustc docs intermittently, but when I do reach for them it's nice to have everything there in one place, especially when I'm not at a computer and can't easily search the source. |
If conflicts are a concern, I can potentially cut this PR down to just the main fix (within the macro), and defer the macro-extraction to follow-up work. (I had to do the extraction to work on the fix, but now that I have the fix it should be easy to backport to main.) |
|
I'd perhaps either do that, or wait for the other PR to get merged, yeah. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
|
Looks good, thanks! Feel free to r=me once PR CI is green. |
|
PR CI is green. @bors r=Kobzol |
|
Try build cancelled. Cancelled workflows: Hint: if you want to run another try build, you do not need to manually cancel the previous one. Just run |
This comment has been minimized.
This comment has been minimized.
bootstrap: Include feature-gated items in bootstrap tool docs try-job: dist-x86_64-linux-alt
|
💥 Test timed out after |
|
@bors try jobs=dist-x86_64-linux-alt |
This comment has been minimized.
This comment has been minimized.
bootstrap: Include feature-gated items in bootstrap tool docs try-job: dist-x86_64-linux-alt
|
💥 Test timed out after |
|
Weird that this keeps happening. @bors try jobs=dist-x86_64-linux-alt |
This comment has been minimized.
This comment has been minimized.
bootstrap: Include feature-gated items in bootstrap tool docs try-job: dist-x86_64-linux-alt
|
💔 Test for 3ec43f9 failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Since CI has been weird today, let's run the try job again, after a fresh rebase. @bors try jobs=dist-x86_64-linux-alt |
This comment has been minimized.
This comment has been minimized.
bootstrap: Include feature-gated items in bootstrap tool docs try-job: dist-x86_64-linux-alt
|
💔 Test for c4394bd failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
|
I can reproduce the failure locally, so it's a real failure. It seems to be triggered by the added |
A major advantage of struct syntax in macros is that rustfmt will auto-format the macro invocations.
This sets `--all-features` when documenting bootstrap tool crates, and enables rustdoc's `#![feature(doc_cfg)]` to display which items are feature-gated.
|
In order to fix the rustfmt doc failures, I added a flag to selectively disable As a prerequisite to that, I also did a general cleanup of the syntax used by |
|
⌛ Trying commit 12818ef with merge f1cd7dd… To cancel the try build, run the command Workflow: https://github.com/rust-lang/rust/actions/runs/33967655012 |
bootstrap: Include feature-gated items in bootstrap tool docs try-job: dist-x86_64-linux-alt
View all comments
I noticed that the nightly-rustc docs for
build_helperdon't include themetricsmodule, because it's gated behind the non-default feature flagfeature = "metrics".This PR fixes that by using
--all-featuresto document all features, and enabling rustdoc's# so that rustdoc will indicate which items require feature flags.The first two commits are a general cleanup of
tool_doc!to pull almost all of its non-trivial code out of the macro and into regular functions.