@@ -348,9 +348,19 @@ $EndFeature, "
348348 pub const MAX : Self = !Self :: MIN ;
349349 }
350350
351- /// The size of this integer type in bits.
352- #[ unstable( feature = "int_bits_const" , issue = "none" ) ]
353- pub const BITS : u32 = $BITS;
351+ doc_comment! {
352+ concat!( "The size of this integer type in bits.
353+
354+ # Examples
355+
356+ ```
357+ " , $Feature, "#![feature(int_bits_const)]
358+ assert_eq!(" , stringify!( $SelfT) , "::BITS, " , stringify!( $BITS) , ");" ,
359+ $EndFeature, "
360+ ```" ) ,
361+ #[ unstable( feature = "int_bits_const" , issue = "none" ) ]
362+ pub const BITS : u32 = $BITS;
363+ }
354364
355365 doc_comment! {
356366 concat!( "Converts a string slice in a given base to an integer.
@@ -2605,9 +2615,19 @@ $EndFeature, "
26052615 pub const MAX : Self = !0 ;
26062616 }
26072617
2608- /// The size of this integer type in bits.
2609- #[ unstable( feature = "int_bits_const" , issue = "none" ) ]
2610- pub const BITS : u32 = $BITS;
2618+ doc_comment! {
2619+ concat!( "The size of this integer type in bits.
2620+
2621+ # Examples
2622+
2623+ ```
2624+ " , $Feature, "#![feature(int_bits_const)]
2625+ assert_eq!(" , stringify!( $SelfT) , "::BITS, " , stringify!( $BITS) , ");" ,
2626+ $EndFeature, "
2627+ ```" ) ,
2628+ #[ unstable( feature = "int_bits_const" , issue = "none" ) ]
2629+ pub const BITS : u32 = $BITS;
2630+ }
26112631
26122632 doc_comment! {
26132633 concat!( "Converts a string slice in a given base to an integer.
0 commit comments