rust-lang/rustfmt

Visual IndentStyle is broken on impl with where clause

開放

#3,071 建立於 2018年9月30日

 (12 則留言) (0 個反應) (1 位負責人)Rust (760 個分叉)batch import
I-poor-formattingUO-indent_stylegood first issueonly-with-option

倉庫指標

星標
 (4,893 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Test code:

struct A<T>
    where T: Send
{
    x: u32,
}

impl<T> A<T> where T: Send
{
    fn foo() {}
}

The impl block is expected to be formatted as:

impl<T> A<T>
    where T: Send
{
    fn foo() {}
}

Everything is ok for indent_style: "Block".

rustfmt version:

rustfmt 0.99.5-nightly (90692a59 2018-09-26)

貢獻者指南