Skip to content

gives up on a box pattern #6650

@ada4a

Description

@ada4a

The following expression:

matches!(stmt, ast::Stmt{kind: ast::StmtKind::MacCall(box ast::MacCallStmt {style : ast::MacStmtStyle::Braces,..}),..})

refuses to get formatted (line formatted, but exceeded maximum width).

Whereas if I remove the box, it gets formatted just fine:

matches!(
    stmt,
    ast::Stmt {
        kind: ast::StmtKind::MacCall(ast::MacCallStmt {
            style: ast::MacStmtStyle::Braces,
            ..
        }),
        ..
    }
)

(I've never touched rustfmt source code before, but I could try working on this, with some help)

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-matchesmatch arms, patterns, blocks, etc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions