Skip to content

Commit e1c8b64

Browse files
committed
Add a safety section for RawBitFlags
Shut up clippy
1 parent 0c70b0f commit e1c8b64

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ pub trait BitFlag: Copy + Clone + 'static + _internal::RawBitFlags {
188188
pub mod _internal {
189189
/// A trait automatically implemented by `#[bitflags]` to make the enum
190190
/// a valid type parameter for `BitFlags<T>`.
191+
///
192+
/// # Safety
193+
///
194+
/// The values should reflect reality, like they do if the implementation
195+
/// is generated by the procmacro.
191196
pub unsafe trait RawBitFlags: Copy + Clone + 'static {
192197
/// The underlying integer type.
193198
type Numeric: BitFlagNum;

0 commit comments

Comments
 (0)