Skip to content

Warn when a local is "mut" but clearly not mutated #3083

Closed
@jruderman

Description

@jruderman

I think this should warn:

fn main()
{
    let mut x = 3;
    assert x == 3;
}

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.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions