chylex / IntelliJ-Inspection-Lens

IntelliJ platform plugin that shows errors, warnings, and other inspection highlights inline.
https://plugins.jetbrains.com/plugin/19678-inspection-lens
Mozilla Public License 2.0
57 stars 12 forks source link

Incorrect warnings (Rust) #28

Open DavidAntliff opened 1 week ago

DavidAntliff commented 1 week ago

Using version 1.4.1 with RustRover 2024.4 EAP (243.20847.53).

Mostly working well, but occasionally gets confused:

image

These two spurious warnings only appear if the plugin is enabled.

Enabled: image

Disabled: image

To be clear, those two extra warnings only appear if the plugin is enabled.

Incidentally, there is no variable called physical_address in this file, but it does occur as a struct field in a different file.

And I'm not sure what's going on with that does not need to be mutable warning - there is no mutable variable there.

Let me know if there's more info I can provide.

chylex commented 1 week ago

Does it happen consistently, i.e. if you re-enable the plugin do the spurious warnings appear again even after restarting RustRover?

DavidAntliff commented 1 week ago

Yes, it seems persistent across IDE restarts, plugin disable/re-enable, as well as invalidate caches. It’s almost like it’s picking up warnings from other files and displaying them for the wrong file…

chylex commented 1 week ago

Are the project sources available?

DavidAntliff commented 1 week ago

Are the project sources available?

Unfortunately not with this project, but I'll keep an eye out for anything similar with any open-source projects I work on, and report back. If you'd prefer to close this issue now, that's cool - I can re-open it once I find another example.

(Note that I cleaned up all warnings from all files and these spurious warnings also disappeared, but I can't tell you when exactly that happened, sadly).