Skip to content

Unused parentheses are not highlighted for assigned value #9220

Open
@Undin

Description

@Undin

Environment

  • IntelliJ Rust plugin version: 0.4.177.4822-222-nightly
  • Rust toolchain version: 1.63.0 (4b91a6ea7 2022-08-08) x86_64-apple-darwin
  • IDE name and version: IntelliJ IDEA 2022.2 Ultimate Edition (IU-222.3345.118)
  • Operating system: macOS 12.3.1
  • Macro expansion engine: new
  • Name resolution engine: new
  • Additional experimental features: org.rust.cargo.features.settings.gutter, org.rust.cargo.emulate.terminal, org.rust.cargo.evaluate.build.scripts, org.rust.macros.proc

Problem description

The plugin detects unused parentheses in some expressions. But if it's an expression in an assigned statement, the plugin shows nothing.
At the same time, rustc show the warning "warning: unnecessary parentheses around assigned value"

image

image

Related to #9197

Steps to reproduce

fn main() {
    let _range = (1..12);
    let _a = (1 + 1);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions