Skip to content
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

[ER] Uplift clippy::unnecessary_mut_passed #83409

Open
leonardo-m opened this issue Mar 23, 2021 · 1 comment
Open

[ER] Uplift clippy::unnecessary_mut_passed #83409

leonardo-m opened this issue Mar 23, 2021 · 1 comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@leonardo-m
Copy link

I think it's worth moving the clippy::unnecessary_mut_passed lint into rustc because it's a very basic coding mistake:

#![allow(unused_variables)]
fn foo(x: &u32) {}
fn bar(a: &[u32]) {}
fn spam(a: &[u32; 10]) {}
fn main() {
    foo(&mut 10);
    let mut a = [0_u32; 10];
    bar(&mut a[..]);
    spam(&mut a);
}

See also, for further improvements:
rust-lang/rust-clippy#5546

@clubby789
Copy link
Contributor

@rustbot label +A-lint

@rustbot rustbot added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label Mar 30, 2023
@fmease fmease added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. and removed A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Dec 21, 2024
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

4 participants