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

Use global paths in macro expansions #1060

Merged
merged 2 commits into from
Jul 27, 2023
Merged

Conversation

uint
Copy link
Contributor

@uint uint commented Jul 25, 2023

Closes #1058

Switching to global paths (the ones that start with ::) means the intended symbols can't be shadowed by user code except maybe by more advanced things like aliasing crates via extern.

@uint uint requested review from frol and agostbiro as code owners July 25, 2023 20:19
@uint uint marked this pull request as draft July 25, 2023 20:24
@uint uint marked this pull request as ready for review July 26, 2023 13:40
Copy link
Contributor

@agostbiro agostbiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

@agostbiro
Copy link
Contributor

I'm wondering if we can somehow lint for this?

@uint
Copy link
Contributor Author

uint commented Jul 27, 2023

I'm wondering if we can somehow lint for this?

I don't really know, but I doubt it would be easy given we'd want to enforce this specifically for macro-expanded code.

@uint uint merged commit 7d2f8eb into master Jul 27, 2023
13 checks passed
@uint uint deleted the 1058-global-paths-in-macro-exps branch July 27, 2023 15:59
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 global paths in all macro expansions
2 participants