11# Documenting rustc
22
3- You might want to build documentation of the various components
3+ You might want to build documentation of the various components
44available like the standard library. There’s two ways to go about this.
5- You can run rustdoc directly on the file to make sure the HTML is
6- correct, which is fast. Alternatively, you can build the documentation
7- as part of the build process through x.py. Both are viable methods
5+ You can run rustdoc directly on the file to make sure the HTML is
6+ correct, which is fast. Alternatively, you can build the documentation
7+ as part of the build process through x.py. Both are viable methods
88 since documentation is more about the content.
99
1010## Document everything
1111
12- ``` bash
13- ./x.py doc
14- ```
12+ ``` ignore
13+ ./x.py doc
14+ ```
1515
1616## If you want to avoid the whole Stage 2 build
1717
18- ``` bash
18+ ``` ignore
1919./x.py doc --stage 1
2020```
2121
@@ -24,10 +24,10 @@ and then it documents the files.
2424
2525## Document specific components
2626
27- ``` bash
28- ./x.py doc src/doc/book
29- ./x.py doc src/doc/nomicon
30- ./x.py doc src/doc/book src/libstd
27+ ``` ignore
28+ ./x.py doc src/doc/book
29+ ./x.py doc src/doc/nomicon
30+ ./x.py doc src/doc/book src/libstd
3131```
3232
3333Much like individual tests or building certain components you can build only
@@ -41,14 +41,14 @@ But, when enabled, compiler documentation does include internal items.
4141
4242Next open up config.toml and make sure these two lines are set to true:
4343
44- ``` bash
44+ ``` toml
4545docs = true
4646compiler-docs = true
4747```
4848
4949When you want to build the compiler docs as well run this command:
5050
51- ``` bash
51+ ``` ignore
5252./x.py doc
5353```
5454
@@ -59,4 +59,4 @@ and build the normally hidden compiler docs!
5959
6060The documentation for the rust components are found at [ rustc doc] .
6161
62- [ rustc doc ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc/
62+ [ rustc doc ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc/
0 commit comments