33use crate :: cmp:: Ordering ;
44use crate :: fmt;
55use crate :: hash:: { Hash , Hasher } ;
6+ use crate :: intrinsics;
67#[ cfg( bootstrap) ]
78use crate :: marker:: StructuralEq ;
89use crate :: marker:: StructuralPartialEq ;
@@ -11,7 +12,6 @@ use crate::str::FromStr;
1112
1213use super :: from_str_radix;
1314use super :: { IntErrorKind , ParseIntError } ;
14- use crate :: intrinsics;
1515
1616mod private {
1717 #[ unstable(
@@ -115,12 +115,11 @@ where
115115 None => {
116116 // SAFETY: The caller guarantees that `n` is non-zero, so this is unreachable.
117117 unsafe {
118- crate :: intrinsics:: assert_unsafe_precondition!(
119- "NonZero::new_unchecked requires the argument to be non-zero" ,
120- ( ) => false
118+ intrinsics:: assert_unsafe_precondition!(
119+ "NonZero::new_unchecked requires the argument to be non-zero" ,
120+ ( ) => false ,
121121 ) ;
122-
123- crate :: hint:: unreachable_unchecked ( )
122+ intrinsics:: unreachable ( )
124123 }
125124 }
126125 }
@@ -155,12 +154,11 @@ where
155154 None => {
156155 // SAFETY: The caller guarantees that `n` references a value that is non-zero, so this is unreachable.
157156 unsafe {
158- crate :: intrinsics:: assert_unsafe_precondition!(
157+ intrinsics:: assert_unsafe_precondition!(
159158 "NonZero::from_mut_unchecked requires the argument to dereference as non-zero" ,
160- ( ) => false
159+ ( ) => false ,
161160 ) ;
162-
163- crate :: hint:: unreachable_unchecked ( )
161+ intrinsics:: unreachable ( )
164162 }
165163 }
166164 }
@@ -770,7 +768,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
770768 fn div( self , other: $Ty) -> $Int {
771769 // SAFETY: div by zero is checked because `other` is a nonzero,
772770 // and MIN/-1 is checked because `self` is an unsigned int.
773- unsafe { crate :: intrinsics:: unchecked_div( self , other. get( ) ) }
771+ unsafe { intrinsics:: unchecked_div( self , other. get( ) ) }
774772 }
775773 }
776774
@@ -783,7 +781,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
783781 fn rem( self , other: $Ty) -> $Int {
784782 // SAFETY: rem by zero is checked because `other` is a nonzero,
785783 // and MIN/-1 is checked because `self` is an unsigned int.
786- unsafe { crate :: intrinsics:: unchecked_rem( self , other. get( ) ) }
784+ unsafe { intrinsics:: unchecked_rem( self , other. get( ) ) }
787785 }
788786 }
789787 } ;
0 commit comments