Skip to content

fix: fix handling of macros in extern blocks #10960

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
Dec 7, 2021
Merged

fix: fix handling of macros in extern blocks #10960

merged 1 commit into from
Dec 7, 2021

Conversation

jonas-schievink
Copy link
Contributor

  • Removes knowledge of what's in an extern block from ItemTree.
  • Treats extern blocks as AssocContainerId and renames the latter to ItemContainerId.
  • Threads the container through name resolution (which is a bit messy).
  • Considers statics to be associated items, since they can be in an extern block. (it might be better to further distinguish potentially-associated-items from potentially-in-an-extern-block-items, but currently I don't expect much of a benefit)
  • Adds a test for the incorrect-case diagnostic demonstrating the impact of this change.

Fixes #8913

bors r+

@jonas-schievink
Copy link
Contributor Author

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 7, 2021

@bors bors bot merged commit 755b668 into rust-lang:master Dec 7, 2021
@jonas-schievink jonas-schievink deleted the ex-tern branch December 7, 2021 17:10
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.

Use extern blocks as item containers
1 participant