Skip to content

Commit f352f38

Browse files
Document RUSTFMT environment variable (#4464)
* Document RUSTFMT env var * Move documentation up * Apply suggestions from code review Co-authored-by: Caleb Cartwright <[email protected]> * Fix accedental removal Co-authored-by: Caleb Cartwright <[email protected]>
1 parent 296c4ad commit f352f38

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ The easiest way to run rustfmt against a project is with `cargo fmt`. `cargo fmt
106106
single-crate projects and [cargo workspaces](https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html).
107107
Please see `cargo fmt --help` for usage information.
108108

109+
You can specify the path to your own `rustfmt` binary for cargo to use by setting the`RUSTFMT`
110+
environment variable. This was added in v1.4.22, so you must have this version or newer to leverage this feature (`cargo fmt --version`)
111+
109112
### Running `rustfmt` directly
110113

111114
To format individual files or arbitrary codes from stdin, the `rustfmt` binary should be used. Some

0 commit comments

Comments
 (0)