doc: remove installing from source
also add "run from source" in contributing.md
This commit is contained in:
parent
0441cc21e3
commit
c9ebd6ce26
@ -91,6 +91,16 @@ Please try to avoid leaving `TODO`s in the code. There are a few around, but I
|
||||
wish there weren't. You can leave `FIXME`s, preferably with an issue number.
|
||||
|
||||
|
||||
### Run Rustfmt from source code
|
||||
|
||||
You may want to run a version of rustfmt from source code as part of a test or
|
||||
hacking on the rustfmt codebase. It's strongly discouraged to install a version
|
||||
of rustfmt from source. Instead, run it using `cargo run`, and `--manifest-path`.
|
||||
|
||||
```
|
||||
cargo run --bin cargo-fmt -- --manifest-path path/to/project/you/want2test/Cargo.toml
|
||||
```
|
||||
|
||||
### Version-gate formatting changes
|
||||
|
||||
A change that introduces a different code-formatting should be gated on the
|
||||
|
18
README.md
18
README.md
@ -71,24 +71,6 @@ because in the future Rustfmt might work on code where it currently does not):
|
||||
fixes to break our stability guarantees).
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
rustup component add rustfmt
|
||||
```
|
||||
|
||||
## Installing from source
|
||||
|
||||
To install from source (nightly required), first checkout to the tag or branch you want to install, then issue
|
||||
|
||||
```sh
|
||||
cargo install --path .
|
||||
```
|
||||
|
||||
This will install `rustfmt` in your `~/.cargo/bin`. Make sure to add `~/.cargo/bin` directory to
|
||||
your PATH variable.
|
||||
|
||||
|
||||
## Running
|
||||
|
||||
You can run Rustfmt by just typing `rustfmt filename` if you used `cargo
|
||||
|
Loading…
Reference in New Issue
Block a user