Skip to content

Unused mut lint doesn't warn on mut self #10667

Closed
@huonw

Description

@huonw
#[deny(unused_mut)];
struct Foo;

impl Foo {
    fn foo(mut self) {}
}

fn main() {}

compiles without error, even though self is never used mutably.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions