Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix where clauses not taking the width of the line into account
Fixes #630
- Loading branch information
Showing
3 changed files
with
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
pub trait Test { | ||
fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool; | ||
fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool; | ||
} | ||
|
||
fn very_long_function_name<F>(very_long_argument: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool { } | ||
|
||
struct VeryLongTupleStructName<A, B, C, D, E>(LongLongTypename, LongLongTypename, i32, i32) where A: LongTrait; | ||
|
||
struct Exactly100CharsToSemicolon<A, B, C, D, E> | ||
(LongLongTypename, i32, i32) | ||
where A: LongTrait1234; | ||
|
||
struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F> where A: LongTrait { | ||
x: i32 | ||
} |
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 @@ | ||
pub trait Test { | ||
fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType | ||
where F: FnMut(Self::Item) -> bool; | ||
fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool; | ||
} | ||
|
||
fn very_long_function_name<F>(very_long_argument: F) -> MyVeryLongReturnType | ||
where F: FnMut(Self::Item) -> bool | ||
{ | ||
} | ||
|
||
struct VeryLongTupleStructName<A, B, C, D, E>(LongLongTypename, LongLongTypename, i32, i32) | ||
where A: LongTrait; | ||
|
||
struct Exactly100CharsToSemicolon<A, B, C, D, E>(LongLongTypename, i32, i32) where A: LongTrait1234; | ||
|
||
struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F> | ||
where A: LongTrait | ||
{ | ||
x: i32, | ||
} |