Skip to content

Commit ccc123a

Browse files
authored
Rollup merge of rust-lang#71645 - ecstatic-morse:readme-build-doc, r=Mark-Simulacrum
Direct contributors to try stage 0 rustdoc first After rust-lang#71458, `./x.py doc --stage 0 src/libstd` is (empirically) able to build the standard library docs using the `rustdoc` packaged with the bootstrap compiler. This means that new contributors don't need to build the compiler to locally inspect small documentation fixes. This was a roadblock for me when I first started contributing to rust and something that still regularly annoys people. We should recommend that contributors give bootstrap `rustdoc` a try before building the whole compiler.
2 parents 65b4482 + 5577b35 commit ccc123a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

CONTRIBUTING.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,18 @@ You can find documentation style guidelines in [RFC 1574][rfc1574].
393393

394394
[rfc1574]: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
395395

396-
In many cases, you don't need a full `./x.py doc`. You can use `rustdoc` directly
397-
to check small fixes. For example, `rustdoc src/doc/reference.md` will render
398-
reference to `doc/reference.html`. The CSS might be messed up, but you can
399-
verify that the HTML is right.
396+
In many cases, you don't need a full `./x.py doc`, which will build the entire
397+
stage 2 compiler and compile the various books published on
398+
[doc.rust-lang.org]. When updating documentation for the standard library,
399+
first try `./x.py doc --stage 0 src/libstd`. If that fails, or if you need to
400+
see the output from the latest version of `rustdoc`, use `--stage 1` instead of
401+
`--stage 0`. Results should appear in `build/$TARGET/crate-docs`.
402+
403+
[doc.rust-lang.org]: htts://doc.rust-lang.org
404+
405+
You can also use `rustdoc` directly to check small fixes. For example,
406+
`rustdoc src/doc/reference.md` will render reference to `doc/reference.html`.
407+
The CSS might be messed up, but you can verify that the HTML is right.
400408

401409
Additionally, contributions to the [rustc-dev-guide] are always welcome. Contributions
402410
can be made directly at [the

0 commit comments

Comments
 (0)