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.
Merge pull request rust-lang#3294 from rchaser53/issue-3278
change new line point in the case of no args
- Loading branch information
Showing
9 changed files
with
107 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// rustfmt-version: One | ||
|
||
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-version: Two | ||
|
||
pub fn parse_conditional<'a, I: 'a>() | ||
-> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a | ||
where | ||
I: Stream<Item = char>, | ||
{ | ||
} |
1 change: 1 addition & 0 deletions
1
tests/source/long-fn-1.rs → tests/source/long-fn-1/version_one.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
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-version: Two | ||
// 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 > {} | ||
} |
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-version: One | ||
|
||
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-version: Two | ||
|
||
pub fn parse_conditional<'a, I: 'a>() | ||
-> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a | ||
where | ||
I: Stream<Item = char>, | ||
{ | ||
} |
1 change: 1 addition & 0 deletions
1
tests/target/long-fn-1.rs → tests/target/long-fn-1/version_one.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
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-version: Two | ||
// 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> { | ||
} | ||
} |