Skip to content

fn-like macros in attribute macros break IDE functionality #10115

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

Closed
Tracked by #9868
jonas-schievink opened this issue Sep 1, 2021 · 2 comments · Fixed by #10127 or #10230
Closed
Tracked by #9868

fn-like macros in attribute macros break IDE functionality #10115

jonas-schievink opened this issue Sep 1, 2021 · 2 comments · Fixed by #10127 or #10230
Assignees
Labels
A-macro macro expansion S-actionable Someone could pick this issue up and work on it right now

Comments

@jonas-schievink
Copy link
Contributor

screenshot-2021-09-02-01:01:24

Turning attribute macros off fixes this and highlights everything correctly.

@jonas-schievink jonas-schievink added A-macro macro expansion S-actionable Someone could pick this issue up and work on it right now labels Sep 1, 2021
@bors bors bot closed this as completed in 796bfcc Sep 2, 2021
@jonas-schievink
Copy link
Contributor Author

I am still seeing this in https://github.com/stm32-rs/bxcan/blob/master/testsuite/tests/integration.rs

@Veykril Veykril self-assigned this Sep 13, 2021
@Veykril
Copy link
Member

Veykril commented Sep 13, 2021

Oh okay so if I see this right, the cause now is that we can expand bang macros in the non-attribute expanded item as well as the attribute expanded item. So the current logic expands the bang call in the non-attribute expanded items which probably messes with token ids.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macro macro expansion S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
2 participants