Skip to content

Add suggestion to unused_parens lint #42892

Closed
@killercup

Description

@killercup

I just ran rustfix on https://github.com/space-wizards/bsdiff-rs and noticed that the built-in unused_parens lint has no suggestions.

Suggesting the underlined span without the surrounding parentheses should be enough.

warning: unnecessary parentheses around assigned value
   --> src/diff.rs:552:21
    |
552 |             lenf += (lens - overlap);
    |                     ^^^^^^^^^^^^^^^^
    |
    = note: #[warn(unused_parens)] on by default

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions