Skip to content

The > in the fat arrow => is categorized semantically as an angle bracket in macros. #18505

@Quelfth

Description

@Quelfth

rust-analyzer version: 0.3.2180-standalone (30e71b6 2024-11-10)

rustc version: 1.81.0 (eeb90cda1 2024-09-04)

editor or extension: VS Code + rust-analyzer v0.3.2180

code snippet to reproduce:

macro_rules! a_macro {
    () => {}
}

Image

In my color scheme, fat arrows are supposed to be green, and the textmate tokens correctly categorize => as fat arrow here. However, the > part of the arrow token has the semantic token type "angle", even though as far as I'm aware, a > which is part of a => token can never function as an angle bracket, and it certainly does not have this function in this case. As far as I'm aware, this happens for any => which is part of the syntax for a macro invocation or definition.

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