Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rust] No const highlighting in struct #3193

Closed
ismell opened this issue Jan 10, 2022 · 3 comments
Closed

[rust] No const highlighting in struct #3193

ismell opened this issue Jan 10, 2022 · 3 comments
Labels
T: bug A bug in an existing language feature

Comments

@ismell
Copy link

ismell commented Jan 10, 2022

What happened?

bitflags! {
    struct Flags: u32 {
        const A = 0b00000001;
        const B = 0b00000010;
        const C = 0b00000100;
        const ABC = Self::A.bits | Self::B.bits | Self::C.bits;
    }
}

There is currently no highlighting in the above code.
Screenshot from 2022-01-10 10-20-14

I would expect A, B, C, and ABC to be marked as entities and appear in the global symbol list.

@ismell ismell added the T: bug A bug in an existing language feature label Jan 10, 2022
@deathaxe
Copy link
Collaborator

deathaxe commented Jan 10, 2022

With PR #2305 merged the struct looks like...

grafik

The constants' identifiers are scoped entity.name.constant.rust and could therefore easily be indexed.

@ismell
Copy link
Author

ismell commented Jan 10, 2022

Yay! Thanks.

@deathaxe
Copy link
Collaborator

With #3195 constants are indexed. Thus closing this issue as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug A bug in an existing language feature
Projects
None yet
Development

No branches or pull requests

2 participants