Skip to content

inactive-code not returned for inactive cfg blocks inside function that has been proc_macro_attribute'd #22293

@d3d9

Description

@d3d9

rust-analyzer version: current master (not version specific)

rustc version: 1.97.0-nightly

editor or extension: Zed 1.0.1, VSCode

This has been bugging me for a while, it seems like something that might already have an open issue but I couldn't manage to find it.

This works:

Image

With the proc_macro from embassy applied, it doesn't:

Image

It's confusing because the code doesn't get dimmed, while it only gets partial highlighting, no inlay hints etc. (which would be fine and not confusing if it were also dimmed..) and a bunch of unresolvedReference etc. as well in some cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions