Skip to content

Commit a78d9a6

Browse files
committed
Unindent nonzero_integer_impl_div_rem macro body
1 parent 81e1a7c commit a78d9a6

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

library/core/src/num/nonzero.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)