rust-lang/rustfmt

PreferSameLine brace_style with trailing_comma Vertical produces weird results

开放

#2,321 创建于 2017年12月30日

 (3 条评论) (0 个反应) (1 位负责人)Rust (760 个派生)batch import
I-poor-formattinggood first issueonly-with-option

仓库指标

星标
 (4,893 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南