Skip to content

Suggest parenthesising multiple arguments to dbg!() #59763

Closed
@varkor

Description

@varkor
fn main() {
    dbg!(5, 10); // error: no rules expected the token `,`
}

It would be nice if the compiler suggested the intended form: dbg!((5, 10)) as this seems like a reasonable mistake. This is specific to a particular macro, though, so I'm not sure how flexible we can be with diagnostics here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions