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.
The mode is fixed for any particular tool.
This sets `--all-features` when documenting bootstrap tool crates, and enables rustdoc's `#![feature(doc_cfg)]` to display which items are feature-gated.
|
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. |
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.