Skip to content

Rustfmt fails in rustfmt_skip-blocks with line exceeded maximum length #1298

Closed
@MackieLoeffel

Description

@MackieLoeffel

If I try to format the following code:

#[cfg_attr(rustfmt, rustfmt_skip)]
fn test() {
    let a = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25];
}

Rustfmt fails with the following error:
Rustfmt failed at stdin:3: line exceeded maximum length (maximum: 100, found: 108) (sorry)

I would expect, that rustfmt doesn't complain about lines, which it shouldn't format in the first place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions