Skip to content

Format derive attributes vertically #5578

@BenLeadbetter

Description

@BenLeadbetter

Hi!

I'd like to format my #[derive(..)] attributes vertically - like this:

#[derive(
  Clone,
  Default,
  PartialEq,
)]

I've tried the following in my rustfmt.toml, but this seemed to have no effect.

attr_fn_like_width = 1 # no effect?
attr_fn_like_width = 0 # nor this

Also adding a trailing comma to the list doesn't work. rustfmt just removes the comma and reformats the list horizontally.

Any help appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: a feature request (not decided/implemented)P-lowLow priority

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions