Skip to content

fix: When descending tokens don't bail on failed macro call expansions #10127

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

Merged
merged 1 commit into from
Sep 2, 2021

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Sep 2, 2021

(with #[test] expansion enabled)
image

The problem was pretty simple, since we go through the ancestors we first try to expand the macro call node we are in since in attributed items these are valid syntaxnodes instead of TokenTrees, we then fail the expansion since the expansion only exists in the attribute expanded file and therefor skip the attribute expansion due to returning immediately. So instead of breaking out we just continue looking up the ancestors.

Fixes #10115
bors r+

@bors
Copy link
Contributor

bors bot commented Sep 2, 2021

@bors bors bot merged commit 796bfcc into rust-lang:master Sep 2, 2021
@Veykril Veykril deleted the descend branch September 2, 2021 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fn-like macros in attribute macros break IDE functionality
1 participant