Skip to content

Commit

Permalink
docs: fix Rust Style Guide links
Browse files Browse the repository at this point in the history
  • Loading branch information
karolzwolak committed Feb 25, 2025
1 parent aa2f3ec commit d1900e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2747,7 +2747,7 @@ See also [`max_width`](#max_width) and [`use_small_heuristics`](#use_small_heuri

## `style_edition`

Controls the edition of the [Rust Style Guide] to use for formatting ([RFC 3338])
Controls the edition of the [Rust Style Guide](https://doc.rust-lang.org/nightly/style-guide/editions.html?highlight=editions#rust-style-editions) to use for formatting ([RFC 3338])

- **Default value**: `"2015"`
- **Possible values**: `"2015"`, `"2018"`, `"2021"`, `"2024"` (unstable variant)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ edition = "2024"

### Style Editions

The option `style_edition` controls the edition of the [Rust Style Guide] to use for formatting ([RFC 3338])
The option `style_edition` controls the edition of the [Rust Style Guide](https://doc.rust-lang.org/nightly/style-guide/editions.html?highlight=editions#rust-style-editions) to use for formatting ([RFC 3338](https://rust-lang.github.io/rfcs/3338-style-evolution.html))
It is inferred from `edition` if not explicitly set, and defaults to the `2015` edition.

Starting with the 2024 edition, Rust introduced changes to default formatting. This can lead to inconsistencies between `rustfmt` and `cargo fmt` if the 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.
Expand Down

0 comments on commit d1900e9

Please sign in to comment.