Skip to content

Commit e7d3970

Browse files
committed
chore(121952): echo comments on the *_assign methods
1 parent 5ebed0b commit e7d3970

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/core/src/num/nonzero.rs

+3
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,8 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
851851

852852
#[stable(feature = "nonzero_div_assign", since = "CURRENT_RUSTC_VERSION")]
853853
impl DivAssign<$Ty> for $Int {
854+
/// This operation rounds towards zero,
855+
/// truncating any fractional part of the exact result, and cannot panic.
854856
#[inline]
855857
fn div_assign(&mut self, other: $Ty) {
856858
*self = *self / other;
@@ -872,6 +874,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
872874

873875
#[stable(feature = "nonzero_div_assign", since = "CURRENT_RUSTC_VERSION")]
874876
impl RemAssign<$Ty> for $Int {
877+
/// This operation satisfies `n % d == n - (n / d) * d`, and cannot panic.
875878
#[inline]
876879
fn rem_assign(&mut self, other: $Ty) {
877880
*self = *self % other;

0 commit comments

Comments
 (0)