rust-lang/rustfmt

PreferSameLine brace_style with trailing_comma Vertical produces weird results

Aberta

#2.321 aberto em 30 de dez. de 2017

 (3 comentários) (0 reação) (1 responsável)Rust (760 forks)batch import
I-poor-formattinggood first issueonly-with-option

Métricas do repositório

Stars
 (4.893 estrelas)
Métricas de merge de PR
 (Mesclagem média 67d) (5 fundiu PRs em 30d)

Description

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.

Guia do colaborador