Add -Z normalize-docs and enable it for compiler docs#79525
Add -Z normalize-docs and enable it for compiler docs#79525bors merged 1 commit intorust-lang:masterfrom
Conversation
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
(I'm testing locally that this actually works and generates the correct docs, this probably shouldn't be approved until then.) |
|
Update: it does not work, I think I modified the wrong part of bootstrap. |
a7aae31 to
b6ea7f1
Compare
|
Ok, it's working now. Not sure if I should add a test that the option is unstable - it uses |
b6ea7f1 to
5b1fb67
Compare
|
If you have to use |
|
None of the As long as the newly added flag is in the |
5b1fb67 to
95a6427
Compare
|
@bors r=GuillaumeGomez We'll finally have compiler docs that look nice 🎉 |
|
📌 Commit 95a6427 has been approved by |
…illaumeGomez Add -Z normalize-docs and enable it for compiler docs Works around rust-lang#79459 by only enabling normalization for the compiler itself (and anyone who opts-in on nightly). Eventually I want to remove this and enable normalization by default, but that's turned out to be [really hard](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/How.20do.20I.20normalize.20projection.20types.20to.20a.20single.20type.3F/near/218125195). This uses a command line option instead of a feature gate so it's easier to pass it to all crates at once. Theoretically it's better to use a feature gate instead so that it's easier for people to use on docs.rs, but I'm also not terribly concerned with how easy it to use a temporary hack. Addresses rust-lang#77459.
Rollup of 11 pull requests Successful merges: - rust-lang#79038 (Change ui test that are run-pass and that do not test the compiler to library tests) - rust-lang#79184 (Stop adding '*' at the end of slice and str typenames for MSVC case) - rust-lang#79227 (Remove const_fn_feature_flags test) - rust-lang#79444 (Move const ip in ui test to unit test) - rust-lang#79522 (Validate lint docs separately.) - rust-lang#79525 (Add -Z normalize-docs and enable it for compiler docs) - rust-lang#79527 (Move intra-doc link tests into a subdirectory) - rust-lang#79548 (Show since when a function is const in stdlib) - rust-lang#79568 (update Miri) - rust-lang#79573 (Update with status for various NetBSD ports.) - rust-lang#79583 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…acrum Fix building compiler docs with stage 0 This regressed in rust-lang#79525 (see https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Can't.20document.20single.20crate). r? `@Mark-Simulacrum`
Works around #79459 by only enabling normalization for the compiler itself (and anyone who opts-in on nightly). Eventually I want to remove this and enable normalization by default, but that's turned out to be really hard.
This uses a command line option instead of a feature gate so it's easier to pass it to all crates at once. Theoretically it's better to use a feature gate instead so that it's easier for people to use on docs.rs, but I'm also not terribly concerned with how easy it to use a temporary hack.
Addresses #77459.