intellij-rust / intellij-rust

Rust plugin for the IntelliJ Platform
https://intellij-rust.github.io
MIT License
4.53k stars 380 forks source link

Unused trait imports not detected if project contains multiple modules. #9622

Open TonCherAmi opened 1 year ago

TonCherAmi commented 1 year ago

Environment

Problem description

The IDE seems to ignore unused trait imports if there's more than one module in the project. Struct/enum imports appear to be detected correctly.

image

The problem goes away if I comment out the module declaration:

image

Steps to reproduce

I've prepared a bare-bones project that should help reproduce the issue.

https://github.com/TonCherAmi/intellij-rust-unused-imports-repro

TonCherAmi commented 1 year ago

Were you able to reproduce this? I'm just wondering if there's anything else I can do to help diagnose this since the issue hasn't been labeled yet.

dima74 commented 1 year ago

Hi @TonCherAmi! This is known limitation. Please subscribe to #2158 for updates