rust-lang/rustfmt

Visual IndentStyle is broken on impl with where clause

Open

#3,071 创建于 2018年9月30日

在 GitHub 查看
 (12 评论) (0 反应) (1 负责人)Rust (760 fork)batch import
I-poor-formattingUO-indent_stylegood first issueonly-with-option

仓库指标

Star
 (4,893 star)
PR 合并指标
 (平均合并 67天) (30 天内合并 5 个 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)

贡献者指南