Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c9ebd6c

Browse files
xxchancalebcartwright
authored andcommitted
doc: remove installing from source
also add "run from source" in contributing.md
1 parent 0441cc2 commit c9ebd6c

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

Contributing.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ Please try to avoid leaving `TODO`s in the code. There are a few around, but I
9191
wish there weren't. You can leave `FIXME`s, preferably with an issue number.
9292

9393

94+
### Run Rustfmt from source code
95+
96+
You may want to run a version of rustfmt from source code as part of a test or
97+
hacking on the rustfmt codebase. It's strongly discouraged to install a version
98+
of rustfmt from source. Instead, run it using `cargo run`, and `--manifest-path`.
99+
100+
```
101+
cargo run --bin cargo-fmt -- --manifest-path path/to/project/you/want2test/Cargo.toml
102+
```
103+
94104
### Version-gate formatting changes
95105

96106
A change that introduces a different code-formatting should be gated on the

README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,6 @@ because in the future Rustfmt might work on code where it currently does not):
7171
fixes to break our stability guarantees).
7272

7373

74-
## Installation
75-
76-
```sh
77-
rustup component add rustfmt
78-
```
79-
80-
## Installing from source
81-
82-
To install from source (nightly required), first checkout to the tag or branch you want to install, then issue
83-
84-
```sh
85-
cargo install --path .
86-
```
87-
88-
This will install `rustfmt` in your `~/.cargo/bin`. Make sure to add `~/.cargo/bin` directory to
89-
your PATH variable.
90-
91-
9274
## Running
9375

9476
You can run Rustfmt by just typing `rustfmt filename` if you used `cargo

0 commit comments

Comments
 (0)