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

"Highlight related" does not work correctly in attribute macros #14229

Closed
jonas-schievink opened this issue Mar 1, 2023 · 1 comment · Fixed by #14299
Closed

"Highlight related" does not work correctly in attribute macros #14229

jonas-schievink opened this issue Mar 1, 2023 · 1 comment · Fixed by #14299
Labels
C-bug Category: bug

Comments

@jonas-schievink
Copy link
Contributor

In the following two examples, putting the cursor on either of the two variable identifiers only highlights the definition, not the subsequent use:

#[tokio::main]
async fn main() {
    let variable = "";
    variable;
}

#[async_trait::async_trait]
trait AsyncTrait {
    fn default(&self) {
        let variable = "";
        variable;
    }
}

Since it happens with 2 mostly unrelated proc macros, I think this is a rust-analyzer bug or limitation.

@jonas-schievink jonas-schievink added the C-bug Category: bug label Mar 1, 2023
@Veykril
Copy link
Member

Veykril commented Mar 1, 2023

This is due to our token mapping breaking down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants