diff options
| author | xxchan <xxchan22f@gmail.com> | 2023-06-19 16:29:57 +0200 |
|---|---|---|
| committer | Caleb Cartwright <calebcartwright@users.noreply.github.com> | 2023-06-19 09:42:40 -0500 |
| commit | c9ebd6ce262ec37c46ff50ac3c56ba19a99254df (patch) | |
| tree | 3a44d73d45cde345f83d1a2bea8ca2292317c2e8 | |
| parent | 0441cc21e3b0ce457d030aedd2cc7776fef047c1 (diff) | |
| download | rust-c9ebd6ce262ec37c46ff50ac3c56ba19a99254df.tar.gz rust-c9ebd6ce262ec37c46ff50ac3c56ba19a99254df.zip | |
doc: remove installing from source
also add "run from source" in contributing.md
| -rw-r--r-- | Contributing.md | 10 | ||||
| -rw-r--r-- | README.md | 18 |
2 files changed, 10 insertions, 18 deletions
diff --git a/Contributing.md b/Contributing.md index 3073996019e..b986a887c92 100644 --- a/Contributing.md +++ b/Contributing.md @@ -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 diff --git a/README.md b/README.md index ef835371b02..c05184fbb04 100644 --- a/README.md +++ b/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 |
