Skip to content

[Feature request] Vertical formatting for attributes #5646

@blyxyas

Description

@blyxyas

Hi, it would be really cool if an attribute's content could be arranged in more ways. (Similar to array_width)

Example:

Currently, if you have this attribute:

#[diagnostic(
    code(...),
    url(...),
    severity(...)
)]
fn x() {...}

It will get rearranged to:

#[diagnostic(code(...), url(...), severity(...))]
fn x() {...}

It would be useful if there was an option specifically for vertical formatting in attributes' content

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-prerequisite-rustfmt-changesBlocked: on other prerequisite rustfmt changes (e.g. another PR that needs to land first)C-feature-requestCategory: a feature request (not decided/implemented)S-blockedStatus: blocked on rustc, an RFC, impl work, etc.; please also add a block reason label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions