From e68bb157e7927676aa625ad878126a8288e7fcc8 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Tue, 24 Feb 2026 22:59:51 -0500 Subject: [PATCH 01/16] chore: Add CHANGELOG details for `float_literal_trailing_zero` --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e004bba0dc2..1a609868931 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ - Support discovering and formatting files via external mods imported within `cfg_match`, similar to `cfg_if` behavior [#6522](https://github.com/rust-lang/rustfmt/pull/6522) - Add new nightly-only `match_arm_indent` option [#6525](https://github.com/rust-lang/rustfmt/pull/6525) - more details in the [configuration section for this new option](https://github.com/rust-lang/rustfmt/blob/HEAD/Configurations.md#match_arm_indent) +- Add new nightly-only `float_literal_trailing_zero` option [#3187](https://github.com/rust-lang/rustfmt/issues/3187) + - See the [`float_literal_trailing_zero` configuration documentation](https://rust-lang.github.io/rustfmt/?version=v1.9.0&search=#float_literal_trailing_zero) for more details ## [1.8.0] 2024-09-20 From e94a680d49fae57c506df349b4ccdef9412f27b7 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Tue, 24 Feb 2026 23:05:44 -0500 Subject: [PATCH 02/16] chore: add CHANGELOG details for `required_version` semver support --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a609868931..24c25736726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ - Correct version chunk splitting in the internal version sort algorithm [#6407](https://github.com/rust-lang/rustfmt/pull/6407) - Extend support for single line let-chain formatting to include cases where the left hand side operand is a literal, in alignment with finalized style rules as part of let-chain stabilization [#6492](https://github.com/rust-lang/rustfmt/pull/6492) - Begin initial formatting for `use closures` and `use chains` (`#![feature(ergonomic_clones)]`). Previously, the closure and chain was left as the developer wrote it [#6532](https://github.com/rust-lang/rustfmt/pull/6532) +- The unstable `required_version` configuration option now support cargo flavored semantic versioning using the `semver` crate [#6063](https://github.com/rust-lang/rustfmt/issues/6063) + ### Added - Add `style_edition=2027` to gate unstable formatting [#6324](https://github.com/rust-lang/rustfmt/pull/6324) From 297ebf173fab7143eb8256e04558cd1f50aafabd Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Tue, 24 Feb 2026 23:10:48 -0500 Subject: [PATCH 03/16] chore: Update CHANGELOG entry for `match_arm_indent` --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24c25736726..3c4b2744b8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ - Add `style_edition=2027` to gate unstable formatting [#6324](https://github.com/rust-lang/rustfmt/pull/6324) - Support discovering and formatting files via external mods imported within `cfg_match`, similar to `cfg_if` behavior [#6522](https://github.com/rust-lang/rustfmt/pull/6522) - Add new nightly-only `match_arm_indent` option [#6525](https://github.com/rust-lang/rustfmt/pull/6525) - - more details in the [configuration section for this new option](https://github.com/rust-lang/rustfmt/blob/HEAD/Configurations.md#match_arm_indent) + - See the [`match_arm_indent` configuration documentation](https://rust-lang.github.io/rustfmt/?version=v1.9.0&search=#match_arm_indent) for more details - Add new nightly-only `float_literal_trailing_zero` option [#3187](https://github.com/rust-lang/rustfmt/issues/3187) - See the [`float_literal_trailing_zero` configuration documentation](https://rust-lang.github.io/rustfmt/?version=v1.9.0&search=#float_literal_trailing_zero) for more details From 4dc1028d32a8c2f485496f79d59a9fb2a869a80f Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Tue, 24 Feb 2026 23:18:24 -0500 Subject: [PATCH 04/16] chore: add CHANGELOG entry for idempotent import fix --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c4b2744b8f..d9eef4f3b40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Fix panic when sorting imports [#6333](https://github.com/rust-lang/rustfmt/issues/6333) - Fix issue with `wrap_comments` invalidating code blocks [#6417](https://github.com/rust-lang/rustfmt/pull/6417) - No longer remove closure block label within a macro call [#6465](https://github.com/rust-lang/rustfmt/issues/6465) +- Fix idempotency issue when normalizing imports [#6558](https://github.com/rust-lang/rustfmt/issues/6558) ### Changed - Stabilize `style_edition=2024` and stabilize the `style_edition` command line option [#6431](https://github.com/rust-lang/rustfmt/pull/6431) [rust-lang/rust#134929](https://github.com/rust-lang/rust/pull/134929) From 151dce4d8a77dec1a68303ebd26889318b937847 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Tue, 24 Feb 2026 23:32:27 -0500 Subject: [PATCH 05/16] chore: add CHANGELOG entry for proper wrapping of long `if-let` pattern --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9eef4f3b40..3e5016c6e5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - Fix issue with `wrap_comments` invalidating code blocks [#6417](https://github.com/rust-lang/rustfmt/pull/6417) - No longer remove closure block label within a macro call [#6465](https://github.com/rust-lang/rustfmt/issues/6465) - Fix idempotency issue when normalizing imports [#6558](https://github.com/rust-lang/rustfmt/issues/6558) +- Properly split long pattern in `if-let` at the `max_width` when setting `style_edition=2027` [#6202](https://github.com/rust-lang/rustfmt/issues/6202) ### Changed - Stabilize `style_edition=2024` and stabilize the `style_edition` command line option [#6431](https://github.com/rust-lang/rustfmt/pull/6431) [rust-lang/rust#134929](https://github.com/rust-lang/rust/pull/134929) From 7b6e253d9854dc757e47e62f8eea9f3ae4e3b1ea Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 00:18:17 -0500 Subject: [PATCH 06/16] chore: add changelog entry for `lazy_static::lazy_static!` formatting --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e5016c6e5d..06444faefe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - No longer remove closure block label within a macro call [#6465](https://github.com/rust-lang/rustfmt/issues/6465) - Fix idempotency issue when normalizing imports [#6558](https://github.com/rust-lang/rustfmt/issues/6558) - Properly split long pattern in `if-let` at the `max_width` when setting `style_edition=2027` [#6202](https://github.com/rust-lang/rustfmt/issues/6202) +- Format `lazy_static::lazy_static!` like `lazy_static!` when setting `style_edition=2027` [#6287](https://github.com/rust-lang/rustfmt/issues/6287) ### Changed - Stabilize `style_edition=2024` and stabilize the `style_edition` command line option [#6431](https://github.com/rust-lang/rustfmt/pull/6431) [rust-lang/rust#134929](https://github.com/rust-lang/rust/pull/134929) From e6874bfe26fa1fc2c8d653cf08022e73f847a81e Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 00:20:57 -0500 Subject: [PATCH 07/16] chore: add CHANGELOG entry for properly handleing unicode whitespace chars in missing spans --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06444faefe0..489d10af8df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Fix idempotency issue when normalizing imports [#6558](https://github.com/rust-lang/rustfmt/issues/6558) - Properly split long pattern in `if-let` at the `max_width` when setting `style_edition=2027` [#6202](https://github.com/rust-lang/rustfmt/issues/6202) - Format `lazy_static::lazy_static!` like `lazy_static!` when setting `style_edition=2027` [#6287](https://github.com/rust-lang/rustfmt/issues/6287) +- Prevent panic when rewriting missing spans that contain unicode whitespace chars [#5739](https://github.com/rust-lang/rustfmt/issues/5739) ### Changed - Stabilize `style_edition=2024` and stabilize the `style_edition` command line option [#6431](https://github.com/rust-lang/rustfmt/pull/6431) [rust-lang/rust#134929](https://github.com/rust-lang/rust/pull/134929) From b75f6b07ba41b832d2ab32e60c32998316d44350 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 00:26:21 -0500 Subject: [PATCH 08/16] chore: add CHANGELOG entry for Allow `NotADirectory` errors --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 489d10af8df..d8be3e14ed0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Properly split long pattern in `if-let` at the `max_width` when setting `style_edition=2027` [#6202](https://github.com/rust-lang/rustfmt/issues/6202) - Format `lazy_static::lazy_static!` like `lazy_static!` when setting `style_edition=2027` [#6287](https://github.com/rust-lang/rustfmt/issues/6287) - Prevent panic when rewriting missing spans that contain unicode whitespace chars [#5739](https://github.com/rust-lang/rustfmt/issues/5739) +- Allow `NotADirectory` errors when looking up rustfmt configuration files [#6624](https://github.com/rust-lang/rustfmt/pull/6624) ### Changed - Stabilize `style_edition=2024` and stabilize the `style_edition` command line option [#6431](https://github.com/rust-lang/rustfmt/pull/6431) [rust-lang/rust#134929](https://github.com/rust-lang/rust/pull/134929) From 62699f780f4b1d6896c51a4443f3b78105ee4004 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 00:32:10 -0500 Subject: [PATCH 09/16] chore: add changelog entry for transitive import sorting for style_edition=2015|2018|2021 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8be3e14ed0..8a94c2d4853 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - Format `lazy_static::lazy_static!` like `lazy_static!` when setting `style_edition=2027` [#6287](https://github.com/rust-lang/rustfmt/issues/6287) - Prevent panic when rewriting missing spans that contain unicode whitespace chars [#5739](https://github.com/rust-lang/rustfmt/issues/5739) - Allow `NotADirectory` errors when looking up rustfmt configuration files [#6624](https://github.com/rust-lang/rustfmt/pull/6624) +- Prevent panic when sorting imports starting with a `_` for `style_edition=2015|2018|2021` [#6668](https://github.com/rust-lang/rustfmt/issues/6668) ### Changed - Stabilize `style_edition=2024` and stabilize the `style_edition` command line option [#6431](https://github.com/rust-lang/rustfmt/pull/6431) [rust-lang/rust#134929](https://github.com/rust-lang/rust/pull/134929) From 719d3d1fef93966583f5089ccda8d45b2f405737 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 00:41:32 -0500 Subject: [PATCH 10/16] chore: add CHANGELOG entry for Properly wrapping long `impl trait` parameters --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a94c2d4853..f2c70ce6fa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Prevent panic when rewriting missing spans that contain unicode whitespace chars [#5739](https://github.com/rust-lang/rustfmt/issues/5739) - Allow `NotADirectory` errors when looking up rustfmt configuration files [#6624](https://github.com/rust-lang/rustfmt/pull/6624) - Prevent panic when sorting imports starting with a `_` for `style_edition=2015|2018|2021` [#6668](https://github.com/rust-lang/rustfmt/issues/6668) +- Properly wrap long `impl trait` function parameters at the `max_width` when setting `style_edition=2027` [#6381](https://github.com/rust-lang/rustfmt/issues/6381) ### Changed - Stabilize `style_edition=2024` and stabilize the `style_edition` command line option [#6431](https://github.com/rust-lang/rustfmt/pull/6431) [rust-lang/rust#134929](https://github.com/rust-lang/rust/pull/134929) From af20b60dd3ab0761c943de9d5ed04f6f135804a5 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 00:42:06 -0500 Subject: [PATCH 11/16] chore: add CHANGELOG entry for `imports_granularity=Module` changes --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c70ce6fa7..70d11b64764 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ - Extend support for single line let-chain formatting to include cases where the left hand side operand is a literal, in alignment with finalized style rules as part of let-chain stabilization [#6492](https://github.com/rust-lang/rustfmt/pull/6492) - Begin initial formatting for `use closures` and `use chains` (`#![feature(ergonomic_clones)]`). Previously, the closure and chain was left as the developer wrote it [#6532](https://github.com/rust-lang/rustfmt/pull/6532) - The unstable `required_version` configuration option now support cargo flavored semantic versioning using the `semver` crate [#6063](https://github.com/rust-lang/rustfmt/issues/6063) +- Top-level imports are no longer merged when setting `imports_granularity=Module`. Note that `imports_granularity=Module` is still an unstable configuration [#6191](https://github.com/rust-lang/rustfmt/issues/6191) ### Added From 4cc4f291c9da205df5fc4627a03b35e4ab852a40 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 00:47:35 -0500 Subject: [PATCH 12/16] chore: add CHANGELOG entry for misc dependency upgrades --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70d11b64764..d38da55623d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,10 @@ - Add new nightly-only `float_literal_trailing_zero` option [#3187](https://github.com/rust-lang/rustfmt/issues/3187) - See the [`float_literal_trailing_zero` configuration documentation](https://rust-lang.github.io/rustfmt/?version=v1.9.0&search=#float_literal_trailing_zero) for more details +### Misc +- Update `term` dependency to 1.1 [#6628](https://github.com/rust-lang/rustfmt/pull/6628) +- Update `toml` dependency to 0.9.5 [#6652](https://github.com/rust-lang/rustfmt/pull/6652) + ## [1.8.0] 2024-09-20 From b8b9cc98080b581534a7ae101b0a2754c7a9641d Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 00:54:24 -0500 Subject: [PATCH 13/16] chore: add CHANGELOG entry for temporary removal of generic-simd support --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d38da55623d..efab7c883e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ - Begin initial formatting for `use closures` and `use chains` (`#![feature(ergonomic_clones)]`). Previously, the closure and chain was left as the developer wrote it [#6532](https://github.com/rust-lang/rustfmt/pull/6532) - The unstable `required_version` configuration option now support cargo flavored semantic versioning using the `semver` crate [#6063](https://github.com/rust-lang/rustfmt/issues/6063) - Top-level imports are no longer merged when setting `imports_granularity=Module`. Note that `imports_granularity=Module` is still an unstable configuration [#6191](https://github.com/rust-lang/rustfmt/issues/6191) +- Disable the `bytecount/generic-simd` optional dependency when using the `generic-simd` feature. The dependency was preventing rustfmt from building on nightly. simd support will be re-enabled once the issue has been fixed [#6807](https://github.com/rust-lang/rustfmt/pull/6807) [llogiq/bytecount#100](https://github.com/llogiq/bytecount/pull/100) ### Added From 13173ff1f614ffb6042c1614516c2b49564a6f7a Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 00:56:05 -0500 Subject: [PATCH 14/16] chore: update date when I think rustfmt v1.9.0 will get synced --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efab7c883e9..2ba2c834ed2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## [Unreleased] -## [1.9.0] 2025-01-03 +## [1.9.0] 2026-02-26 ### Fixed - No longer strip `r#` prefix from `break` and `continue` labels [#6411](https://github.com/rust-lang/rustfmt/issues/6411) From 17803d3f1eddf87f9928ef6dac900ddd3c6e9978 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 16:56:15 -0500 Subject: [PATCH 15/16] chore: add CHANGELOG entry for `trailing_semicolon` changes for last loop expression --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba2c834ed2..aa18ce484b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,14 @@ - The unstable `required_version` configuration option now support cargo flavored semantic versioning using the `semver` crate [#6063](https://github.com/rust-lang/rustfmt/issues/6063) - Top-level imports are no longer merged when setting `imports_granularity=Module`. Note that `imports_granularity=Module` is still an unstable configuration [#6191](https://github.com/rust-lang/rustfmt/issues/6191) - Disable the `bytecount/generic-simd` optional dependency when using the `generic-simd` feature. The dependency was preventing rustfmt from building on nightly. simd support will be re-enabled once the issue has been fixed [#6807](https://github.com/rust-lang/rustfmt/pull/6807) [llogiq/bytecount#100](https://github.com/llogiq/bytecount/pull/100) +- The `trailing_semicolon` configuration option will add a trailing semicolon to the last expression in a loop body when enabled along with `edition >= 2024` and `style_edition >= 2027` [#6711](https://github.com/rust-lang/rustfmt/pull/6711) + ```rust + fn main() { + for x in 0..10 { + println!("{x}"); + } + } + ``` ### Added From 24e66919d8053f2851d20c7a134d9b841dc99928 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 25 Feb 2026 17:07:14 -0500 Subject: [PATCH 16/16] chore: add CHANGELOG entry for deduplicate imports when `imports_granularity=Module` --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa18ce484b0..7f0470d214f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - Allow `NotADirectory` errors when looking up rustfmt configuration files [#6624](https://github.com/rust-lang/rustfmt/pull/6624) - Prevent panic when sorting imports starting with a `_` for `style_edition=2015|2018|2021` [#6668](https://github.com/rust-lang/rustfmt/issues/6668) - Properly wrap long `impl trait` function parameters at the `max_width` when setting `style_edition=2027` [#6381](https://github.com/rust-lang/rustfmt/issues/6381) +- Better support for deduplicating imports when setting `imports_granularity=Module` [#6243](https://github.com/rust-lang/rustfmt/issues/6243) ### Changed - Stabilize `style_edition=2024` and stabilize the `style_edition` command line option [#6431](https://github.com/rust-lang/rustfmt/pull/6431) [rust-lang/rust#134929](https://github.com/rust-lang/rust/pull/134929)