Skip to content

Commit 40823ca

Browse files
authored
Improve the landing page for contributing to the libstd docs (#1666)
1 parent cf4daae commit 40823ca

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/building/compiler-documenting.md

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ like the standard library (std) or the compiler (rustc).
3131
./x.py doc compiler library
3232
```
3333

34+
See [the nightly docs index page](https://doc.rust-lang.org/nightly/) for a full list of books.
35+
3436
- Document internal rustc items
3537

3638
Compiler documentation is not built by default.

src/contributing.md

+8-11
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,11 @@ This section has moved to ["Using External Repositories"](./external-repos.md).
274274

275275
Documentation improvements are very welcome. The source of `doc.rust-lang.org`
276276
is located in [`src/doc`] in the tree, and standard API documentation is generated
277-
from the source code itself (e.g. [`lib.rs`]). Documentation pull requests function
278-
in the same way as other pull requests.
277+
from the source code itself (e.g. [`library/std/src/lib.rs`][std-root]). Documentation pull requests
278+
function in the same way as other pull requests.
279279

280280
[`src/doc`]: https://github.com/rust-lang/rust/tree/master/src/doc
281-
[`lib.rs`]: https://github.com/rust-lang/rust/blob/master/library/std/src/lib.rs#L1
281+
[`std-root`]: https://github.com/rust-lang/rust/blob/master/library/std/src/lib.rs#L1
282282

283283
To find documentation-related issues, sort by the [A-docs label][adocs].
284284

@@ -288,14 +288,11 @@ You can find documentation style guidelines in [RFC 1574][rfc1574].
288288

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

291-
In many cases, you don't need a full `./x.py doc --stage 2`, which will build
292-
the entire stage 2 compiler and compile the various books published on
293-
[doc.rust-lang.org][docs]. When updating documentation for the standard library,
294-
first try `./x.py doc library`. If that fails, or if you need to
295-
see the output from the latest version of `rustdoc`, add `--stage 1`.
296-
Results should appear in `build/host/doc`.
297-
298-
[docs]: https://doc.rust-lang.org
291+
To build the standard library documentation, use `x doc --stage 0 library --open`.
292+
To build the documentation for a book (e.g. the unstable book), use `x doc src/doc/unstable-book.`
293+
Results should appear in `build/host/doc`, as well as automatically open in your default browser.
294+
See [Building Documentation](./building/compiler-documenting.md#building-documentation) for more
295+
information.
299296

300297
You can also use `rustdoc` directly to check small fixes. For example,
301298
`rustdoc src/doc/reference.md` will render reference to `doc/reference.html`.

0 commit comments

Comments
 (0)