From 21852b68aef16ef058f68e6bb2d5d6913e6942d1 Mon Sep 17 00:00:00 2001 From: Karol Zwolak Date: Tue, 25 Feb 2025 19:18:22 +0100 Subject: [PATCH] docs: link to edition in style_edition section --- Configurations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Configurations.md b/Configurations.md index 06e2281c48f..46fc4c1772f 100644 --- a/Configurations.md +++ b/Configurations.md @@ -2806,12 +2806,12 @@ Controls the edition of the [Rust Style Guide] to use for formatting ([RFC 3338] - **Possible values**: `"2015"`, `"2018"`, `"2021"`, `"2024"` (unstable variant) - **Stable**: No -This option is inferred from the `edition` if not specified. +This option is inferred from the [`edition`](#edition) if not specified. See [Rust Style Editions] for details on style editions. Starting with the 2024 edition, Rust introduced changes to default formatting. This can lead to inconsistencies between `rustfmt` and `cargo fmt` if the style edition is not explicitly configured. This is because `cargo fmt` automatically picks up the edition from `Cargo.toml`, while `rustfmt` defaults to the `2015` edition unless otherwise specified. -To ensure consistent formatting, it is recommended to specify the `edition` or `style_edition` in a `rustfmt.toml` configuration file. For example: +To ensure consistent formatting, it is recommended to specify the [`edition`](#edition) or `style_edition` in a `rustfmt.toml` configuration file. For example: ```toml style_edition = "2024"