@@ -283,30 +283,30 @@ macro_rules! nonzero_integer_impl_div_rem {
283283 } ;
284284
285285 ( $Ty: ident unsigned $Int: ty) => {
286- #[ stable( feature = "nonzero_div" , since = "1.51.0" ) ]
287- impl Div <$Ty> for $Int {
288- type Output = $Int;
289- /// This operation rounds towards zero,
290- /// truncating any fractional part of the exact result, and cannot panic.
291- #[ inline]
292- fn div( self , other: $Ty) -> $Int {
293- // SAFETY: div by zero is checked because `other` is a nonzero,
294- // and MIN/-1 is checked because `self` is an unsigned int.
295- unsafe { crate :: intrinsics:: unchecked_div( self , other. get( ) ) }
296- }
286+ #[ stable( feature = "nonzero_div" , since = "1.51.0" ) ]
287+ impl Div <$Ty> for $Int {
288+ type Output = $Int;
289+ /// This operation rounds towards zero,
290+ /// truncating any fractional part of the exact result, and cannot panic.
291+ #[ inline]
292+ fn div( self , other: $Ty) -> $Int {
293+ // SAFETY: div by zero is checked because `other` is a nonzero,
294+ // and MIN/-1 is checked because `self` is an unsigned int.
295+ unsafe { crate :: intrinsics:: unchecked_div( self , other. get( ) ) }
297296 }
297+ }
298298
299- #[ stable( feature = "nonzero_div" , since = "1.51.0" ) ]
300- impl Rem <$Ty> for $Int {
301- type Output = $Int;
302- /// This operation satisfies `n % d == n - (n / d) * d`, and cannot panic.
303- #[ inline]
304- fn rem( self , other: $Ty) -> $Int {
305- // SAFETY: rem by zero is checked because `other` is a nonzero,
306- // and MIN/-1 is checked because `self` is an unsigned int.
307- unsafe { crate :: intrinsics:: unchecked_rem( self , other. get( ) ) }
308- }
299+ #[ stable( feature = "nonzero_div" , since = "1.51.0" ) ]
300+ impl Rem <$Ty> for $Int {
301+ type Output = $Int;
302+ /// This operation satisfies `n % d == n - (n / d) * d`, and cannot panic.
303+ #[ inline]
304+ fn rem( self , other: $Ty) -> $Int {
305+ // SAFETY: rem by zero is checked because `other` is a nonzero,
306+ // and MIN/-1 is checked because `self` is an unsigned int.
307+ unsafe { crate :: intrinsics:: unchecked_rem( self , other. get( ) ) }
309308 }
309+ }
310310 } ;
311311}
312312
0 commit comments