intellij-rust/intellij-rust
View on GitHubUnused parentheses are not highlighted for assigned value
Open
#9,220 opened on Aug 21, 2022
help wantedimprovementsubsystem::highlighting
Repository metrics
- Stars
- (4,526 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
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"
Related to #9197
Steps to reproduce
fn main() {
let _range = (1..12);
let _a = (1 + 1);
}