I have a minimal repro of this issue here: https://github.com/chris-oo/ra-inactive-code-repro
Essentially, if a module file is cfg gated with #![cfg(windows)] or any OS that you're not currently targeting, rust-analyzer incorrectly marks the whole parent file as greyed out with the inactive code warning instead of just marking the module as greyed out. It also marks the module that should be inactive as not greyed out, but with no type completions.
This code does compile with rustc and runs as expected. It seemed to repro with both release and pre-release versions.
Pictured RA version: v0.4.2064 (pre-release)
Rust version: 1.80
I have a minimal repro of this issue here: https://github.com/chris-oo/ra-inactive-code-repro
Essentially, if a module file is cfg gated with
#![cfg(windows)]or any OS that you're not currently targeting, rust-analyzer incorrectly marks the whole parent file as greyed out with the inactive code warning instead of just marking the module as greyed out. It also marks the module that should be inactive as not greyed out, but with no type completions.This code does compile with rustc and runs as expected. It seemed to repro with both release and pre-release versions.
Pictured RA version: v0.4.2064 (pre-release)
Rust version: 1.80