Skip to content

Missing constant color highlighting inside stringify! #14377

@MariaSolOs

Description

@MariaSolOs

rust-analyzer version: 0.3.1435-standalone (f1e51af 2023-03-12)

rustc version: 1.70.0-nightly (ff4b772 2023-03-10)

relevant settings: Shouldn't be relevant to the bug per se, but I'm using this color theme.

While experimenting with macro_rules, I found the following weird behavior:
image

For some reason, when using an all-caps snake-case argument with the stringify!() macro that begins with a single all-cap letter followed by an underscore (I know, this is such a niche case that I won't be hurt if this gets backlogged forever), the corresponding argument isn't properly highlighted. I suspect this is an issue with semantic tokens (?) since the inspector shows the following:
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-highlighting(semantic) token highlightingC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions