rust-lang/rustfmt

PreferSameLine brace_style with trailing_comma Vertical produces weird results

Open

#2.321 geöffnet am 30. Dez. 2017

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Rust (760 Forks)batch import
I-poor-formattinggood first issueonly-with-option

Repository-Metriken

Stars
 (4.893 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 10T 21h) (8 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide