Skip to content

lint: _-prefixed variables don't get an unused-mut warning. #10518

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

Merged
merged 1 commit into from
Nov 17, 2013

Conversation

huonw
Copy link
Member

@huonw huonw commented Nov 16, 2013

Bringing it into line with the unused-variable one,

fn main() {
    let mut _a = 1;
}

will not warn that _a is never used mutably.

Fixes #6911.

Bringing it into line with the unused-variable one,

    fn main() {
        let mut _a = 1;
    }

will not warn that `_a` is never used mutably.

Fixes rust-lang#6911.
bors added a commit that referenced this pull request Nov 17, 2013
Bringing it into line with the unused-variable one,

    fn main() {
        let mut _a = 1;
    }

will not warn that `_a` is never used mutably.

Fixes #6911.
@bors bors closed this Nov 17, 2013
@bors bors merged commit 6bd8bb5 into rust-lang:master Nov 17, 2013
@huonw huonw deleted the 6911 branch November 25, 2013 10:56
flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 7, 2023
…n, r=llogiq

Add [`manual_slice_size_calculation`]

Fixes: rust-lang#10518

---

changelog: new lint [`manual_slice_size_calculation`]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable the unused-mut warning when variable is prefixed by underscore
3 participants