Skip to content

PreferSameLine brace_style with trailing_comma Vertical produces weird results #2321

@djc

Description

@djc

Upgrading rustfmt-nightly from 0.2.15 to 0.3.4 created this change:

@@ -104,8 +122,7 @@ impl FetchCommandMessages {
 
 pub trait FetchBuilderMessages
 where
-    Self: Sized,
-{
+    Self: Sized, {
     fn prepare(self) -> FetchCommandMessages;
 
     fn num(self, num: u32) -> FetchCommandMessages {

This seems like a bug, since trailing_comma = "Vertical" should not trigger if the opening brace is on the same line.

Metadata

Metadata

Assignees

Labels

good first issueIssues up for grabs, also good candidates for new rustfmt contributorsonly-with-optionrequires a non-default option value to reproducepoor-formatting

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions