rust-lang/rustfmt

Visual IndentStyle is broken on impl with where clause

Open

#3 071 ouverte le 30 sept. 2018

Voir sur GitHub
 (12 commentaires) (0 réactions) (1 assigné)Rust (760 forks)batch import
I-poor-formattingUO-indent_stylegood first issueonly-with-option

Métriques du dépôt

Stars
 (4 893 stars)
Métriques de merge PR
 (Merge moyen 10j 21h) (8 PRs mergées en 30 j)

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)

Guide contributeur