rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Associated methods removed by conditional compilation are not dimmed

Open rodrigocfd opened this issue 2 years ago • 3 comments

rust-analyzer version: 7e95c14ea 2022-05-17 stable

rustc version: 1.61.0 (fe5b13d68 2022-05-18)

relevant settings: Windows 10 x64, VSCode 1.67.2

Screenshot:

dimmed

rodrigocfd avatar May 26 '22 11:05 rodrigocfd

This seems to be a FIXME.

https://github.com/rust-lang/rust-analyzer/blob/634cfe3d72e785c843ca5d412b12be137b2e14fb/crates/ide-diagnostics/src/handlers/inactive_code.rs#L108-L124

kartva avatar Aug 07 '22 13:08 kartva

List of cases where dimming doesn't work (i.e. basically everything that's not considered to be an "item" on its own)

image

kartva avatar Aug 07 '22 17:08 kartva

Yes, in general the problem here is passing through diagnostics from the collection step for these things. It's not really complicated, but it needs some plumbing.

flodiebold avatar Aug 07 '22 18:08 flodiebold