Skip to content

Modernization#246

Merged
KodrAus merged 3 commits intobitflags:masterfrom
konsumlamm:modernization
Jul 19, 2021
Merged

Modernization#246
KodrAus merged 3 commits intobitflags:masterfrom
konsumlamm:modernization

Conversation

@konsumlamm
Copy link
Contributor

This PR takes the modernization parts from #205.

Comment on lines -259 to -263
// 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

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

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

Choose a reason for hiding this comment

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

Thanks @konsumlamm! This is a great effort 🙇

@KodrAus KodrAus merged commit 46a2c8e into bitflags:master 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.

2 participants