rust-lang/rustfmt

Visual IndentStyle is broken on impl with where clause

Open

#3.071 geöffnet am 30. Sept. 2018

Auf GitHub ansehen
 (12 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Rust (760 Forks)batch import
I-poor-formattingUO-indent_stylegood first issueonly-with-option

Repository-Metriken

Stars
 (4.893 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 10T 21h) (8 gemergte PRs in 30 T)

Beschreibung

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)

Contributor Guide