-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix brace_style="PreferSameLine"
with trailing_comma="Vertical"
results
#5556
base: master
Are you sure you want to change the base?
Changes from 3 commits
a86f4cc
16befec
1f17b6c
316361f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ struct Lorem { | |
|
||
struct Dolor<T> | ||
where | ||
T: Eq, { | ||
T: Eq { | ||
sit: T, | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// rustfmt-brace_style: PreferSameLine | ||
// rustfmt-trailing_comma: Always | ||
|
||
fn lorem<S, T,>(lorem: S, ipsum: T,) | ||
where | ||
S: Add + Sub, | ||
T: Mul + Div, { | ||
// body | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we also include a where clause with with a single bound. I like that you've included tests with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the review. I added test case for brace_style AlwaysNextLine and SameLineWhere pattern. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for including those additional test cases! I'll have some time later this week to give this a more thorough review 😁 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// rustfmt-brace_style: PreferSameLine | ||
// rustfmt-trailing_comma: Vertical | ||
|
||
fn lorem<S, T>(lorem: S, ipsum: T) | ||
where | ||
S: Add + Sub, | ||
T: Mul + Div { | ||
// body | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically changing existing tests is not something we want to do and is usually a sign that the change needs to be version gated to prevent breaking formatting changes. However
brace_style
is an unstable option so the version gate might not be necessary in this caseThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do it if I have to! 👍