Skip to content

Bad indentation after "where" clause and "#[test]" attribute #299

Open
@unipro

Description

@unipro

A newline after the #[test] is indented:

impl <A, D> MyTrait<A, D> for YourType
    where A: TraitB + TraitC,
          D: TraitE + TraitF {}

#[test]
    ^

I expect format this as

impl <A, D> MyTrait<A, D> for YourType
    where A: TraitB + TraitC,
          D: TraitE + TraitF {}

#[test]
^

This is another result:

fn call_twice<F>(closure: F) where F: FnMut() {
    closure();
    closure();
}

#[test]
    ^

Expected indentation:

fn call_twice<F>(closure: F) where F: FnMut() {
    closure();
    closure();
}

#[test]
^

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions