@@ -387,7 +387,7 @@ assert_eq!(n.count_ones(), 3);
387387```" ) ,
388388 #[ inline]
389389 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
390- pub fn count_ones( self ) -> u32 {
390+ pub const fn count_ones( self ) -> u32 {
391391 self . 0 . count_ones( )
392392 }
393393 }
@@ -407,7 +407,7 @@ assert_eq!(Wrapping(!0", stringify!($t), ").count_zeros(), 0);
407407```" ) ,
408408 #[ inline]
409409 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
410- pub fn count_zeros( self ) -> u32 {
410+ pub const fn count_zeros( self ) -> u32 {
411411 self . 0 . count_zeros( )
412412 }
413413 }
@@ -430,7 +430,7 @@ assert_eq!(n.trailing_zeros(), 3);
430430```" ) ,
431431 #[ inline]
432432 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
433- pub fn trailing_zeros( self ) -> u32 {
433+ pub const fn trailing_zeros( self ) -> u32 {
434434 self . 0 . trailing_zeros( )
435435 }
436436 }
@@ -456,7 +456,7 @@ assert_eq!(n.trailing_zeros(), 3);
456456 /// ```
457457 #[ inline]
458458 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
459- pub fn rotate_left( self , n: u32 ) -> Self {
459+ pub const fn rotate_left( self , n: u32 ) -> Self {
460460 Wrapping ( self . 0 . rotate_left( n) )
461461 }
462462
@@ -481,7 +481,7 @@ assert_eq!(n.trailing_zeros(), 3);
481481 /// ```
482482 #[ inline]
483483 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
484- pub fn rotate_right( self , n: u32 ) -> Self {
484+ pub const fn rotate_right( self , n: u32 ) -> Self {
485485 Wrapping ( self . 0 . rotate_right( n) )
486486 }
487487
@@ -505,7 +505,7 @@ assert_eq!(n.trailing_zeros(), 3);
505505 /// ```
506506 #[ inline]
507507 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
508- pub fn swap_bytes( self ) -> Self {
508+ pub const fn swap_bytes( self ) -> Self {
509509 Wrapping ( self . 0 . swap_bytes( ) )
510510 }
511511
@@ -532,7 +532,7 @@ assert_eq!(n.trailing_zeros(), 3);
532532 /// ```
533533 #[ unstable( feature = "reverse_bits" , issue = "48763" ) ]
534534 #[ inline]
535- pub fn reverse_bits( self ) -> Self {
535+ pub const fn reverse_bits( self ) -> Self {
536536 Wrapping ( self . 0 . reverse_bits( ) )
537537 }
538538
@@ -560,7 +560,7 @@ if cfg!(target_endian = \"big\") {
560560```" ) ,
561561 #[ inline]
562562 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
563- pub fn from_be( x: Self ) -> Self {
563+ pub const fn from_be( x: Self ) -> Self {
564564 Wrapping ( <$t>:: from_be( x. 0 ) )
565565 }
566566 }
@@ -589,7 +589,7 @@ if cfg!(target_endian = \"little\") {
589589```" ) ,
590590 #[ inline]
591591 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
592- pub fn from_le( x: Self ) -> Self {
592+ pub const fn from_le( x: Self ) -> Self {
593593 Wrapping ( <$t>:: from_le( x. 0 ) )
594594 }
595595 }
@@ -618,7 +618,7 @@ if cfg!(target_endian = \"big\") {
618618```" ) ,
619619 #[ inline]
620620 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
621- pub fn to_be( self ) -> Self {
621+ pub const fn to_be( self ) -> Self {
622622 Wrapping ( self . 0 . to_be( ) )
623623 }
624624 }
@@ -647,7 +647,7 @@ if cfg!(target_endian = \"little\") {
647647```" ) ,
648648 #[ inline]
649649 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
650- pub fn to_le( self ) -> Self {
650+ pub const fn to_le( self ) -> Self {
651651 Wrapping ( self . 0 . to_le( ) )
652652 }
653653 }
@@ -707,7 +707,7 @@ assert_eq!(n.leading_zeros(), 3);
707707```" ) ,
708708 #[ inline]
709709 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
710- pub fn leading_zeros( self ) -> u32 {
710+ pub const fn leading_zeros( self ) -> u32 {
711711 self . 0 . leading_zeros( )
712712 }
713713 }
@@ -784,7 +784,7 @@ assert!(!Wrapping(-10", stringify!($t), ").is_positive());
784784```" ) ,
785785 #[ inline]
786786 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
787- pub fn is_positive( self ) -> bool {
787+ pub const fn is_positive( self ) -> bool {
788788 self . 0 . is_positive( )
789789 }
790790 }
@@ -806,7 +806,7 @@ assert!(!Wrapping(10", stringify!($t), ").is_negative());
806806```" ) ,
807807 #[ inline]
808808 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
809- pub fn is_negative( self ) -> bool {
809+ pub const fn is_negative( self ) -> bool {
810810 self . 0 . is_negative( )
811811 }
812812 }
@@ -836,7 +836,7 @@ assert_eq!(n.leading_zeros(), 2);
836836```" ) ,
837837 #[ inline]
838838 #[ unstable( feature = "wrapping_int_impl" , issue = "32463" ) ]
839- pub fn leading_zeros( self ) -> u32 {
839+ pub const fn leading_zeros( self ) -> u32 {
840840 self . 0 . leading_zeros( )
841841 }
842842 }
0 commit comments