Skip to content

Commit

Permalink
Add a safety section for RawBitFlags
Browse files Browse the repository at this point in the history
Shut up clippy
  • Loading branch information
meithecatte committed Mar 24, 2022
1 parent 0c70b0f commit e1c8b64
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ pub trait BitFlag: Copy + Clone + 'static + _internal::RawBitFlags {
pub mod _internal {
/// A trait automatically implemented by `#[bitflags]` to make the enum
/// a valid type parameter for `BitFlags<T>`.
///
/// # Safety
///
/// The values should reflect reality, like they do if the implementation
/// is generated by the procmacro.
pub unsafe trait RawBitFlags: Copy + Clone + 'static {
/// The underlying integer type.
type Numeric: BitFlagNum;
Expand Down

0 comments on commit e1c8b64

Please sign in to comment.