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

Modernization #246

Merged
merged 3 commits into from Jul 19, 2021
Merged

Modernization #246

merged 3 commits into from Jul 19, 2021

Conversation

konsumlamm
Copy link
Contributor

@konsumlamm konsumlamm commented Jun 27, 2021

This PR takes the modernization parts from #205.

// Re-export libcore using an alias so that the macros can work without
// requiring `extern crate core` downstream.
#[doc(hidden)]
pub extern crate core as _core;

Copy link
Contributor Author

@konsumlamm konsumlamm Jun 27, 2021

Choose a reason for hiding this comment

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

As far as I can tell, this isn't necessary any more. The macros now use core:: instead of $crate::_core::, which seems to work fine, but I'm not entirely sure if it causes problem with macro hygiene.

Copy link
Contributor Author

@konsumlamm konsumlamm Jul 19, 2021

Choose a reason for hiding this comment

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

I just noticed that this breaks if someone defines mod core {} when using bitflags!, I'll put together a PR to fix that.

Copy link
Member

@KodrAus KodrAus left a comment

Thanks @konsumlamm! This is a great effort 🙇

@KodrAus KodrAus merged commit 46a2c8e into bitflags:master Jul 19, 2021
6 checks passed
konsumlamm added a commit to konsumlamm/bitflags that referenced this pull request Jul 19, 2021
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.

None yet

2 participants