Skip to content

Commit 9db6838

Browse files
committed
Revert "defer changes for zero argument functions until style_edition=2027"
This effectively reverts commit a7e0c15. This change made it into the 2024 style edition so we can't defer it to 2027.
1 parent 0332da0 commit 9db6838

File tree

13 files changed

+3
-69
lines changed

13 files changed

+3
-69
lines changed

src/items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2569,7 +2569,7 @@ fn rewrite_fn_base(
25692569
.last()
25702570
.map_or(false, |last_line| last_line.contains("//"));
25712571

2572-
if context.config.style_edition() >= StyleEdition::Edition2027 {
2572+
if context.config.style_edition() >= StyleEdition::Edition2024 {
25732573
if closing_paren_overflow_max_width {
25742574
result.push(')');
25752575
result.push_str(&indent.to_string_with_newline(context.config));

tests/source/long-fn-1/style_edition_2027.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/target/issue-3278/style_edition_2024.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/target/issue-3278/style_edition_2027.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/source/issue-3278/style_edition_2027.rs renamed to tests/target/issue-3278/version_two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-style_edition: 2027
1+
// rustfmt-style_edition: 2024
22

33
pub fn parse_conditional<'a, I: 'a>()
44
-> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a

tests/target/long-fn-1/style_edition_2024.rs

Lines changed: 0 additions & 29 deletions
This file was deleted.

tests/target/long-fn-1/style_edition_2027.rs renamed to tests/target/long-fn-1/version_two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-style_edition: 2027
1+
// rustfmt-style_edition: 2024
22
// Tests that a function which is almost short enough, but not quite, gets
33
// formatted correctly.
44

0 commit comments

Comments
 (0)