-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Use the bitflags!
macro to implement FlagV1
#45079
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
Conversation
r? @dtolnay (rust_highfive has picked a reviewer for you, use r? to override) |
// 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; |
@kennytm understood, but why is bitflags being compiled with stage 0's libcore rather than the bootstrap compiler's? |
Yes libcore cannot have any dependencies, so we won't be able to do this. |
Can you help me understand why? I think it'd be worthwhile to document. |
Sorry I don't really have the time to explain it right now, but you can certainly try to fix up all the errors and see what happens. The gymnastics required will basically make it not worth it. |
@tamird from the sound of it, it sounds like this PR should be closed as "impossible by design" — do you have any further plans for it? |
I think the reason @alexcrichton wanted to talk about is that you need a single However, which is used in e.g. However, if you really wanted to, you could change the |
Thanks, @arielb1. I'll update this PR when the necessary changes have been made upstream! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed bitflags/bitflags#130 to track this change on bitflags' side. Let's open another PR here when the implementation is no longer blocked on bitflags.
Closes #15738.
This currently doesn't compile, and I don't really understand why:
Sorry @alexcrichton, I think you're probably still the most knowledgable person on this :(
Full log: