Address review comments in #1286.
This commit is contained in:
parent
e3512c8cd8
commit
940fbb5f7a
|
|
@ -16,9 +16,8 @@ Therefore, formatting this repository using `cargo fmt` is not recommended.
|
||||||
Instead, formatting should be done using `./x.py fmt`. It's a good habit to run
|
Instead, formatting should be done using `./x.py fmt`. It's a good habit to run
|
||||||
`./x.py fmt` before every commit, as this reduces conflicts later.
|
`./x.py fmt` before every commit, as this reduces conflicts later.
|
||||||
|
|
||||||
Formatting is checked by the "tidy" script. It runs automatically when you do
|
Formatting is checked by the `tidy` script. It runs automatically when you do
|
||||||
`./x.py test` and can be run in isolation with `./x.py test tidy`. `./x.py fmt
|
`./x.py test` and can be run in isolation with `./x.py fmt --check`.
|
||||||
--check` also works.
|
|
||||||
|
|
||||||
If you want to use format-on-save in your editor, the pinned version of
|
If you want to use format-on-save in your editor, the pinned version of
|
||||||
`rustfmt` is built under `build/<target>/stage0/bin/rustfmt`. You'll have to
|
`rustfmt` is built under `build/<target>/stage0/bin/rustfmt`. You'll have to
|
||||||
|
|
|
||||||
|
|
@ -116,8 +116,8 @@ of time.
|
||||||
|
|
||||||
[rust-analyzer]: ./building/suggested.html#configuring-rust-analyzer-for-rustc
|
[rust-analyzer]: ./building/suggested.html#configuring-rust-analyzer-for-rustc
|
||||||
|
|
||||||
See the chapters on [building](./building/how-to-build-and-run.md) and
|
See the chapters on [building](./building/how-to-build-and-run.md),
|
||||||
[testing](./tests/intro.md) for more details.
|
[testing](./tests/intro.md), and [rustdoc](./rustdoc.md) for more details.
|
||||||
|
|
||||||
### Contributing code to other Rust projects
|
### Contributing code to other Rust projects
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
|
||||||
* Use `./x.py build` to make a usable
|
* Use `./x.py build` to make a usable
|
||||||
rustdoc you can run on other projects.
|
rustdoc you can run on other projects.
|
||||||
* Add `library/test` to be able to use `rustdoc --test`.
|
* Add `library/test` to be able to use `rustdoc --test`.
|
||||||
* Add `--keep-stage 1` on subsequent runs to avoid rebuilding some things.
|
|
||||||
* Run `rustup toolchain link stage2 build/$TARGET/stage2` to add a
|
* Run `rustup toolchain link stage2 build/$TARGET/stage2` to add a
|
||||||
custom toolchain called `stage2` to your rustup environment. After
|
custom toolchain called `stage2` to your rustup environment. After
|
||||||
running that, `cargo +stage2 doc` in any directory will build with
|
running that, `cargo +stage2 doc` in any directory will build with
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,7 @@ modifying rustc to see if things are generally working correctly would be the
|
||||||
following:
|
following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# First build
|
|
||||||
./x.py test src/test/ui
|
./x.py test src/test/ui
|
||||||
|
|
||||||
# Subsequent builds (optional, but can save time)
|
|
||||||
./x.py test src/test/ui --keep-stage 1
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This will run the `ui` test suite. Of course, the choice
|
This will run the `ui` test suite. Of course, the choice
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue