forked from rust-lang/rustfmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
defer changes for zero argument functions until style_edition=2027
This moves changes that were originally gated by `version=Two` to `style_edition=2027` instead of releasing them with `style_edition=2024`.
- Loading branch information
Showing
14 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
tests/target/issue-3278/version_two.rs → ...s/source/issue-3278/style_edition_2027.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// 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<PathBuf>, ) -> (Input, Option<PathBuf>) {} | ||
|
||
fn some_inpu(&mut self, input: Input, input_path: Option<PathBuf>) -> (Input, Option<PathBuf>) {} | ||
} | ||
|
||
// #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 > {} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// rustfmt-style_edition: 2024 | ||
|
||
pub fn parse_conditional<'a, I: 'a>( | ||
) -> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a | ||
where | ||
I: Stream<Item = char>, | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// rustfmt-style_edition: 2027 | ||
|
||
pub fn parse_conditional<'a, I: 'a>() | ||
-> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a | ||
where | ||
I: Stream<Item = char>, | ||
{ | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// 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<PathBuf>, | ||
) -> (Input, Option<PathBuf>) { | ||
} | ||
|
||
fn some_inpu(&mut self, input: Input, input_path: Option<PathBuf>) -> (Input, Option<PathBuf>) { | ||
} | ||
} | ||
|
||
// #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> { | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
tests/target/long-fn-1/version_two.rs → tests/target/long-fn-1/style_edition_2027.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters