Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
huonw opened this issue Nov 26, 2013 · 0 comments
Closed

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

huonw opened this issue Nov 26, 2013 · 0 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@huonw
Copy link
Member

huonw commented Nov 26, 2013

#[deny(unused_mut)];
struct Foo;

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

fn main() {}

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

@bors bors closed this as completed in 15ba0c3 Jan 27, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 23, 2023
…on-macros, r=llogiq

Ignore `manual_slice_size_calculation` in code from macro expansions

changelog: none, assuming same release as rust-lang#10659
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

No branches or pull requests

1 participant