Skip to content

macro fails to be wrapped if it is exactly one character beyond max_width #3805

Closed
@AaronKutch

Description

@AaronKutch
macro_rules! test {
    ($asdfghj:expr, $qwertyuiop:expr, $zxcvbnmasdfghjkl:expr, $aeiouaeiouaeiou:expr, $add:expr) => {{
        return;
    }};
}

Using rustfmt 1.4.8 nightly with a .rustfmt.toml with the following:

unstable_features = true
error_on_line_overflow = true
error_on_unformatted = true
#format_macro_matchers = true

If this is manually formatted, overflow will not happen. However, if the format_macro_matchers = true line is uncommented, the line will always be reformatted to overflow until another character is added.

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