Conversation
|
cc @MarijnS95 do these look right to you? I haven't used |
| pub use core; | ||
|
|
||
| #[cfg(feature = "serde")] | ||
| pub use serde; |
There was a problem hiding this comment.
These have moved into the external module alongside their supporting code
| ) => { | ||
| $(#[$outer])* | ||
| $vis struct $BitFlags(<Self as $crate::__private::PublicFlags>::Internal); | ||
| $vis struct $BitFlags(<$BitFlags as $crate::__private::PublicFlags>::Internal); |
There was a problem hiding this comment.
I was getting a build error with Self being unknown here. Not sure if it was bytemuck's derives or a change in rustc but it was easily fixed.
|
cc @Lokathor 👋 I just wanted to make sure I've got these #[repr(transparent)]
struct FlagsField<T> {
bits: T
}where The impls I've come up with look like this. Does that look right to you? Is there anything else we need to guarantee to make sure these impls are safe to do? |
|
yep, |
|
Awesome, thanks for checking them out! 🙇 I'll get this rolling through now. |
Closes #311
I've also added some docs on how to support external libraries here for future contributors. Since the
bytemuckimpls themselves areunsafe, I've added a note to where we generate our internal flags type warning that its ABI can't be changed.