Skip to content

spurious unused_parens warning #55342

Closed
@programmerjake

Description

@programmerjake

The following code produces a unused_parens warning however if the parenthesis around the mut v are removed the code doesn't compile:

pub fn f(v: &u32) -> u32 {
    let &(mut v) = v;
    v += 1;
    v
}

Metadata

Metadata

Assignees

Labels

A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions