File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1165,8 +1165,12 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
11651165 impl Div <NonZero <$Int>> for $Int {
11661166 type Output = $Int;
11671167
1168+ /// Same as `self / other.get()`, but because `other` is a `NonZero<_>`,
1169+ /// there's never a runtime check for division-by-zero.
1170+ ///
11681171 /// This operation rounds towards zero, truncating any fractional
11691172 /// part of the exact result, and cannot panic.
1173+ #[ doc( alias = "unchecked_div" ) ]
11701174 #[ inline]
11711175 fn div( self , other: NonZero <$Int>) -> $Int {
11721176 // SAFETY: Division by zero is checked because `other` is non-zero,
@@ -1177,6 +1181,9 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
11771181
11781182 #[ stable( feature = "nonzero_div_assign" , since = "1.79.0" ) ]
11791183 impl DivAssign <NonZero <$Int>> for $Int {
1184+ /// Same as `self /= other.get()`, but because `other` is a `NonZero<_>`,
1185+ /// there's never a runtime check for division-by-zero.
1186+ ///
11801187 /// This operation rounds towards zero, truncating any fractional
11811188 /// part of the exact result, and cannot panic.
11821189 #[ inline]
You can’t perform that action at this time.
0 commit comments