Skip to content

Commit fd0ea74

Browse files
tshepangytmimi
authored andcommitted
readme: improve Editions section
1 parent bedef9b commit fd0ea74

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ See [GitHub page](https://rust-lang.github.io/rustfmt/) for details.
172172

173173
The `edition` option determines the Rust language edition used for parsing the code. This is important for syntax compatibility but does not directly control formatting behavior (see [Style Editions](#style-editions)).
174174

175-
When running `cargo fmt`, the `edition` is automatically read from the `Cargo.toml` file. However, when running `rustfmt` directly the `edition` defaults to 2015 if not explicitly configured. For consistent parsing between rustfmt and `cargo fmt` you should configure the `edition`.
176-
For example in your `rustfmt.toml` file:
175+
When running `cargo fmt`, the `edition` is automatically read from the `Cargo.toml` file. However, when running `rustfmt` directly, the `edition` defaults to 2015. For consistent parsing between rustfmt and `cargo fmt`, you should configure the `edition` in your `rustfmt.toml` file:
177176

178177
```toml
179178
edition = "2018"

0 commit comments

Comments
 (0)