@@ -11,9 +11,9 @@ pub mod udiv;
1111
1212pub use self :: leading_zeros:: __clzsi2;
1313
14+ public_test_dep ! {
1415/// Trait for some basic operations on integers
15- #[ doc( hidden) ]
16- pub trait Int :
16+ pub ( crate ) trait Int :
1717 Copy
1818 + core:: fmt:: Debug
1919 + PartialEq
@@ -81,6 +81,7 @@ pub trait Int:
8181 fn overflowing_add( self , other: Self ) -> ( Self , bool ) ;
8282 fn leading_zeros( self ) -> u32 ;
8383}
84+ }
8485
8586macro_rules! int_impl_common {
8687 ( $ty: ty) => {
@@ -255,10 +256,10 @@ int_impl!(i32, u32);
255256int_impl ! ( i64 , u64 ) ;
256257int_impl ! ( i128 , u128 ) ;
257258
259+ public_test_dep ! {
258260/// Trait for integers twice the bit width of another integer. This is implemented for all
259261/// primitives except for `u8`, because there is not a smaller primitive.
260- #[ doc( hidden) ]
261- pub trait DInt : Int {
262+ pub ( crate ) trait DInt : Int {
262263 /// Integer that is half the bit width of the integer this trait is implemented for
263264 type H : HInt <D = Self > + Int ;
264265
@@ -271,11 +272,12 @@ pub trait DInt: Int {
271272 /// Constructs an integer using lower and higher half parts
272273 fn from_lo_hi( lo: Self :: H , hi: Self :: H ) -> Self ;
273274}
275+ }
274276
277+ public_test_dep ! {
275278/// Trait for integers half the bit width of another integer. This is implemented for all
276279/// primitives except for `u128`, because it there is not a larger primitive.
277- #[ doc( hidden) ]
278- pub trait HInt : Int {
280+ pub ( crate ) trait HInt : Int {
279281 /// Integer that is double the bit width of the integer this trait is implemented for
280282 type D : DInt <H = Self > + Int ;
281283
@@ -291,6 +293,7 @@ pub trait HInt: Int {
291293 /// Widening multiplication. This cannot overflow.
292294 fn widen_mul( self , rhs: Self ) -> Self :: D ;
293295}
296+ }
294297
295298macro_rules! impl_d_int {
296299 ( $( $X: ident $D: ident) ,* ) => {
@@ -353,11 +356,12 @@ impl_h_int!(
353356 i64 u64 i128
354357) ;
355358
359+ public_test_dep ! {
356360/// Trait to express (possibly lossy) casting of integers
357- #[ doc( hidden) ]
358- pub trait CastInto < T : Copy > : Copy {
361+ pub ( crate ) trait CastInto <T : Copy >: Copy {
359362 fn cast( self ) -> T ;
360363}
364+ }
361365
362366macro_rules! cast_into {
363367 ( $ty: ty) => {
0 commit comments