From a050bdccdb158f8cd758eb8e2c7777a441a4d7a8 Mon Sep 17 00:00:00 2001 From: xxchan Date: Mon, 17 Jul 2023 12:41:43 +0200 Subject: [PATCH] doc: fix instruction about running Rustfmt from source code `cargo-fmt` uses `rustfmt` from `PATH`, so `cargo run --bin cargo-fmt` still uses installed `rustfmt` instead of built one. --- Contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contributing.md b/Contributing.md index b986a887c92..a2a3617fd23 100644 --- a/Contributing.md +++ b/Contributing.md @@ -98,7 +98,7 @@ 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 +RUSTFMT="./target/debug/rustfmt" cargo run --bin cargo-fmt -- --manifest-path path/to/project/you/want2test/Cargo.toml ``` ### Version-gate formatting changes