rust-lang/rustfmt

Visual IndentStyle is broken on impl with where clause

Aberta

#3.071 aberto em 30 de set. de 2018

 (12 comentários) (0 reação) (1 responsável)Rust (760 forks)batch import
I-poor-formattingUO-indent_stylegood 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

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)

Guia do colaborador