From e4ac56f0b64940dea1cae635c1ac16b5bd01b73d Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Wed, 1 Jan 2025 22:57:04 -0500 Subject: [PATCH 1/8] update changelog for v1.9.0 release Most notably this release stabalizes `style_edition=2024` and the `--style-edition` CLI option. --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12cc2db51af..df2337efba0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## [Unreleased] + + +## [1.9.0] 2025-01-03 + +### Fixed +- No longer strip `r#` prefix from `break` and `continue` labels [#6411](https://github.com/rust-lang/rustfmt/issues/6411) + ```rust + fn main() { + 'r#if: { + break 'r#if; + } + } + ``` +- Fix panic when sorting imports [#6333](https://github.com/rust-lang/rustfmt/issues/6333) + +### Changed +- Stabalize `style_edition=2024` and stabalize 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) +- Apply version sorting to module declarations when using `style_edition=2024` [#6368](https://github.com/rust-lang/rustfmt/pull/6368) +- When users set the deprecated `version` config, rustfmt now gives a hint about which equivalent `style_edition` they should use [#6361](https://github.com/rust-lang/rustfmt/pull/6361) + +### Added +Add `style_edition=2027` to gate unstable formatting [#6324](https://github.com/rust-lang/rustfmt/pull/6324) + +### Misc +- Correct version chunk splitting in the internal version sort algorithm [#6407](https://github.com/rust-lang/rustfmt/pull/6407) +- Return `Result` from `Shape` methods [#6398](https://github.com/rust-lang/rustfmt/pull/6398) + + ## [1.8.0] 2024-09-20 ### Fixed From 6669683117295eb6dba63a8f84e4f49fb3c9082f Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Sat, 21 Jun 2025 12:28:29 -0400 Subject: [PATCH 2/8] fix Stabilize typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df2337efba0..147748cdd03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ - Fix panic when sorting imports [#6333](https://github.com/rust-lang/rustfmt/issues/6333) ### Changed -- Stabalize `style_edition=2024` and stabalize 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) +- 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) - Apply version sorting to module declarations when using `style_edition=2024` [#6368](https://github.com/rust-lang/rustfmt/pull/6368) - When users set the deprecated `version` config, rustfmt now gives a hint about which equivalent `style_edition` they should use [#6361](https://github.com/rust-lang/rustfmt/pull/6361) From 55afcaf8102c6ea0a4ede680a6dbe5faa017002a Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Sat, 21 Jun 2025 12:31:43 -0400 Subject: [PATCH 3/8] move version sort entry to `Changed` section --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 147748cdd03..44b928fb4bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,12 +20,12 @@ - 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) - Apply version sorting to module declarations when using `style_edition=2024` [#6368](https://github.com/rust-lang/rustfmt/pull/6368) - When users set the deprecated `version` config, rustfmt now gives a hint about which equivalent `style_edition` they should use [#6361](https://github.com/rust-lang/rustfmt/pull/6361) +- Correct version chunk splitting in the internal version sort algorithm [#6407](https://github.com/rust-lang/rustfmt/pull/6407) ### Added Add `style_edition=2027` to gate unstable formatting [#6324](https://github.com/rust-lang/rustfmt/pull/6324) ### Misc -- Correct version chunk splitting in the internal version sort algorithm [#6407](https://github.com/rust-lang/rustfmt/pull/6407) - Return `Result` from `Shape` methods [#6398](https://github.com/rust-lang/rustfmt/pull/6398) From af18613d6b6a157ef7d33925aaf69f1857f5ac84 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Sat, 21 Jun 2025 12:32:24 -0400 Subject: [PATCH 4/8] remove note on internal change --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44b928fb4bb..6239412084e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,6 @@ Add `style_edition=2027` to gate unstable formatting [#6324](https://github.com/rust-lang/rustfmt/pull/6324) ### Misc -- Return `Result` from `Shape` methods [#6398](https://github.com/rust-lang/rustfmt/pull/6398) ## [1.8.0] 2024-09-20 From 8b145b98e51ca5dc7971b4268eb849d375790475 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Sat, 21 Jun 2025 12:53:00 -0400 Subject: [PATCH 5/8] Add Caleb's entries to the `Fixed` Section --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6239412084e..f5afb763033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ } ``` - 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) ### 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 e3a819700f35aee6a75b6233bac81cd9ed3498b2 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Sat, 21 Jun 2025 12:54:44 -0400 Subject: [PATCH 6/8] Add Caleb's entries to the `Changed` section --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5afb763033..f1e5d86f1dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ - Apply version sorting to module declarations when using `style_edition=2024` [#6368](https://github.com/rust-lang/rustfmt/pull/6368) - When users set the deprecated `version` config, rustfmt now gives a hint about which equivalent `style_edition` they should use [#6361](https://github.com/rust-lang/rustfmt/pull/6361) - 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) ### Added Add `style_edition=2027` to gate unstable formatting [#6324](https://github.com/rust-lang/rustfmt/pull/6324) From 32b7fc0ffa97f5eb707c09c2687431242f4352e9 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Sat, 21 Jun 2025 12:58:37 -0400 Subject: [PATCH 7/8] Add Caleb's entries to the `Added` section. --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1e5d86f1dc..908109c30a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,10 @@ - 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) ### Added -Add `style_edition=2027` to gate unstable formatting [#6324](https://github.com/rust-lang/rustfmt/pull/6324) +- 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/master/Configurations.md#match_arm_indent) ### Misc From 57e8bd53f2103693f3e7be4767d11390456620fc Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Sat, 21 Jun 2025 13:38:10 -0400 Subject: [PATCH 8/8] remove `misc` section --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 908109c30a0..69fc38a416d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,8 +32,6 @@ - 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/master/Configurations.md#match_arm_indent) -### Misc - ## [1.8.0] 2024-09-20