diff --git a/src/items.rs b/src/items.rs index 0e814644304..b8ad789a884 100644 --- a/src/items.rs +++ b/src/items.rs @@ -2569,7 +2569,7 @@ fn rewrite_fn_base( .last() .map_or(false, |last_line| last_line.contains("//")); - if context.config.style_edition() >= StyleEdition::Edition2027 { + if context.config.style_edition() >= StyleEdition::Edition2024 { if closing_paren_overflow_max_width { result.push(')'); result.push_str(&indent.to_string_with_newline(context.config)); diff --git a/tests/source/issue-3278/style_edition_2015.rs b/tests/source/issue-3278/version_one.rs similarity index 100% rename from tests/source/issue-3278/style_edition_2015.rs rename to tests/source/issue-3278/version_one.rs diff --git a/tests/source/issue-3278/style_edition_2024.rs b/tests/source/issue-3278/version_two.rs similarity index 100% rename from tests/source/issue-3278/style_edition_2024.rs rename to tests/source/issue-3278/version_two.rs diff --git a/tests/source/long-fn-1/style_edition_2027.rs b/tests/source/long-fn-1/style_edition_2027.rs deleted file mode 100644 index ded5a38d179..00000000000 --- a/tests/source/long-fn-1/style_edition_2027.rs +++ /dev/null @@ -1,21 +0,0 @@ -// rustfmt-style_edition: 2027 -// Tests that a function which is almost short enough, but not quite, gets -// formatted correctly. - -impl Foo { - fn some_input(&mut self, input: Input, input_path: Option, ) -> (Input, Option) {} - - fn some_inpu(&mut self, input: Input, input_path: Option) -> (Input, Option) {} -} - -// #1843 -#[allow(non_snake_case)] -pub extern "C" fn Java_com_exonum_binding_storage_indices_ValueSetIndexProxy_nativeContainsByHash() -> bool { - false -} - -// #3009 -impl Something { - fn my_function_name_is_way_to_long_but_used_as_a_case_study_or_an_example_its_fine( -) -> Result< (), String > {} -} diff --git a/tests/source/long-fn-1/style_edition_2015.rs b/tests/source/long-fn-1/version_one.rs similarity index 100% rename from tests/source/long-fn-1/style_edition_2015.rs rename to tests/source/long-fn-1/version_one.rs diff --git a/tests/source/long-fn-1/style_edition_2024.rs b/tests/source/long-fn-1/version_two.rs similarity index 100% rename from tests/source/long-fn-1/style_edition_2024.rs rename to tests/source/long-fn-1/version_two.rs diff --git a/tests/target/issue-3278/style_edition_2024.rs b/tests/target/issue-3278/style_edition_2024.rs deleted file mode 100644 index 676db3b20f8..00000000000 --- a/tests/target/issue-3278/style_edition_2024.rs +++ /dev/null @@ -1,8 +0,0 @@ -// rustfmt-style_edition: 2024 - -pub fn parse_conditional<'a, I: 'a>( -) -> impl Parser + 'a -where - I: Stream, -{ -} diff --git a/tests/target/issue-3278/style_edition_2027.rs b/tests/target/issue-3278/style_edition_2027.rs deleted file mode 100644 index f33dffeb7f5..00000000000 --- a/tests/target/issue-3278/style_edition_2027.rs +++ /dev/null @@ -1,8 +0,0 @@ -// rustfmt-style_edition: 2027 - -pub fn parse_conditional<'a, I: 'a>() --> impl Parser + 'a -where - I: Stream, -{ -} diff --git a/tests/target/issue-3278/style_edition_2015.rs b/tests/target/issue-3278/version_one.rs similarity index 100% rename from tests/target/issue-3278/style_edition_2015.rs rename to tests/target/issue-3278/version_one.rs diff --git a/tests/source/issue-3278/style_edition_2027.rs b/tests/target/issue-3278/version_two.rs similarity index 82% rename from tests/source/issue-3278/style_edition_2027.rs rename to tests/target/issue-3278/version_two.rs index f33dffeb7f5..eb605e509f9 100644 --- a/tests/source/issue-3278/style_edition_2027.rs +++ b/tests/target/issue-3278/version_two.rs @@ -1,4 +1,4 @@ -// rustfmt-style_edition: 2027 +// rustfmt-style_edition: 2024 pub fn parse_conditional<'a, I: 'a>() -> impl Parser + 'a diff --git a/tests/target/long-fn-1/style_edition_2024.rs b/tests/target/long-fn-1/style_edition_2024.rs deleted file mode 100644 index f5edca5ee7d..00000000000 --- a/tests/target/long-fn-1/style_edition_2024.rs +++ /dev/null @@ -1,29 +0,0 @@ -// rustfmt-style_edition: 2024 -// Tests that a function which is almost short enough, but not quite, gets -// formatted correctly. - -impl Foo { - fn some_input( - &mut self, - input: Input, - input_path: Option, - ) -> (Input, Option) { - } - - fn some_inpu(&mut self, input: Input, input_path: Option) -> (Input, Option) { - } -} - -// #1843 -#[allow(non_snake_case)] -pub extern "C" fn Java_com_exonum_binding_storage_indices_ValueSetIndexProxy_nativeContainsByHash( -) -> bool { - false -} - -// #3009 -impl Something { - fn my_function_name_is_way_to_long_but_used_as_a_case_study_or_an_example_its_fine( - ) -> Result<(), String> { - } -} diff --git a/tests/target/long-fn-1/style_edition_2015.rs b/tests/target/long-fn-1/version_one.rs similarity index 100% rename from tests/target/long-fn-1/style_edition_2015.rs rename to tests/target/long-fn-1/version_one.rs diff --git a/tests/target/long-fn-1/style_edition_2027.rs b/tests/target/long-fn-1/version_two.rs similarity index 95% rename from tests/target/long-fn-1/style_edition_2027.rs rename to tests/target/long-fn-1/version_two.rs index 87361f0b96b..f6007398bcc 100644 --- a/tests/target/long-fn-1/style_edition_2027.rs +++ b/tests/target/long-fn-1/version_two.rs @@ -1,4 +1,4 @@ -// rustfmt-style_edition: 2027 +// rustfmt-style_edition: 2024 // Tests that a function which is almost short enough, but not quite, gets // formatted correctly.