From e7a57fc030c96e1f623bc0917a9e386ebf6f12a3 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sat, 12 Apr 2025 12:31:49 +0200 Subject: [PATCH] readme: improve Editions section --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 0fdd2a6b60a..77e3335cf2c 100644 --- a/README.md +++ b/README.md @@ -172,8 +172,7 @@ See [GitHub page](https://rust-lang.github.io/rustfmt/) for details. 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)). -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`. -For example in your `rustfmt.toml` file: +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: ```toml edition = "2018"