Skip to content

Commit 86f27d4

Browse files
committed
Hide duplicated docs for new const fns
1 parent 8cce531 commit 86f27d4

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
@@ -579,6 +579,8 @@ for_each_uint! { $ty $hide_docs =>
579579
///
580580
/// The argument must not have set bits at positions not corresponding to
581581
/// any flag.
582+
#[inline(always)]
583+
$(#[$hide_docs])?
582584
pub const unsafe fn from_bits_unchecked_c(
583585
val: $ty, const_token: ConstToken<T, $ty>
584586
) -> Self {
@@ -608,6 +610,7 @@ for_each_uint! { $ty $hide_docs =>
608610
/// assert_eq!(FLAGS, MyFlag::Two);
609611
/// ```
610612
#[inline(always)]
613+
$(#[$hide_docs])?
611614
pub const fn from_bits_truncate_c(
612615
bits: $ty, const_token: ConstToken<T, $ty>
613616
) -> Self {
@@ -668,6 +671,8 @@ for_each_uint! { $ty $hide_docs =>
668671
/// const NEGATED: BitFlags<MyFlag> = FLAGS.not_c(BitFlags::CONST_TOKEN);
669672
/// assert_eq!(NEGATED, MyFlag::Three);
670673
/// ```
674+
#[inline(always)]
675+
$(#[$hide_docs])?
671676
pub const fn not_c(self, const_token: ConstToken<T, $ty>) -> Self {
672677
BitFlags {
673678
val: !self.val & const_token.0.val,

0 commit comments

Comments
 (0)