Don't stutter in operator descriptions #29365
This commit is contained in:
parent
49c67bd632
commit
8b92255b64
@ -196,7 +196,7 @@ pub trait Drop {
|
||||
fn drop(&mut self);
|
||||
}
|
||||
|
||||
/// The `Add` trait is used to specify the functionality of `+`.
|
||||
/// The addition operator `+`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -269,7 +269,7 @@ fn add(self, other: $t) -> $t { self + other }
|
||||
|
||||
add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
||||
|
||||
/// The `Sub` trait is used to specify the functionality of `-`.
|
||||
/// The subtraction operator `-`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -342,7 +342,7 @@ fn sub(self, other: $t) -> $t { self - other }
|
||||
|
||||
sub_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
||||
|
||||
/// The `Mul` trait is used to specify the functionality of `*`.
|
||||
/// The multiplication operator `*`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -464,7 +464,7 @@ fn mul(self, other: $t) -> $t { self * other }
|
||||
|
||||
mul_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
||||
|
||||
/// The `Div` trait is used to specify the functionality of `/`.
|
||||
/// The division operator `/`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -609,7 +609,7 @@ fn div(self, other: $t) -> $t { self / other }
|
||||
|
||||
div_impl_float! { f32 f64 }
|
||||
|
||||
/// The `Rem` trait is used to specify the functionality of `%`.
|
||||
/// The remainder operator `%`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -689,7 +689,7 @@ fn rem(self, other: $t) -> $t { self % other }
|
||||
|
||||
rem_impl_float! { f32 f64 }
|
||||
|
||||
/// The `Neg` trait is used to specify the functionality of unary `-`.
|
||||
/// The unary negation operator `-`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -768,7 +768,7 @@ macro_rules! neg_impl_unsigned {
|
||||
// neg_impl_unsigned! { usize u8 u16 u32 u64 }
|
||||
neg_impl_numeric! { isize i8 i16 i32 i64 i128 f32 f64 }
|
||||
|
||||
/// The `Not` trait is used to specify the functionality of unary `!`.
|
||||
/// The unary logical negation operator `!`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -826,7 +826,7 @@ fn not(self) -> $t { !self }
|
||||
|
||||
not_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
|
||||
|
||||
/// The `BitAnd` trait is used to specify the functionality of `&`.
|
||||
/// The bitwise AND operator `&`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -909,7 +909,7 @@ fn bitand(self, rhs: $t) -> $t { self & rhs }
|
||||
|
||||
bitand_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
|
||||
|
||||
/// The `BitOr` trait is used to specify the functionality of `|`.
|
||||
/// The bitwise OR operator `|`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -992,7 +992,7 @@ fn bitor(self, rhs: $t) -> $t { self | rhs }
|
||||
|
||||
bitor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
|
||||
|
||||
/// The `BitXor` trait is used to specify the functionality of `^`.
|
||||
/// The bitwise XOR operator `^`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1078,7 +1078,7 @@ fn bitxor(self, other: $t) -> $t { self ^ other }
|
||||
|
||||
bitxor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
|
||||
|
||||
/// The `Shl` trait is used to specify the functionality of `<<`.
|
||||
/// The left shift operator `<<`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1181,7 +1181,7 @@ macro_rules! shl_impl_all {
|
||||
|
||||
shl_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 isize i128 }
|
||||
|
||||
/// The `Shr` trait is used to specify the functionality of `>>`.
|
||||
/// The right shift operator `>>`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1284,7 +1284,7 @@ macro_rules! shr_impl_all {
|
||||
|
||||
shr_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
|
||||
|
||||
/// The `AddAssign` trait is used to specify the functionality of `+=`.
|
||||
/// The addition assignment operator `+=`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1340,7 +1340,7 @@ fn add_assign(&mut self, other: $t) { *self += other }
|
||||
|
||||
add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
||||
|
||||
/// The `SubAssign` trait is used to specify the functionality of `-=`.
|
||||
/// The subtraction assignment operator `-=`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1396,7 +1396,7 @@ fn sub_assign(&mut self, other: $t) { *self -= other }
|
||||
|
||||
sub_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
||||
|
||||
/// The `MulAssign` trait is used to specify the functionality of `*=`.
|
||||
/// The multiplication assignment operator `*=`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1441,7 +1441,7 @@ fn mul_assign(&mut self, other: $t) { *self *= other }
|
||||
|
||||
mul_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
||||
|
||||
/// The `DivAssign` trait is used to specify the functionality of `/=`.
|
||||
/// The division assignment operator `/=`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1485,7 +1485,7 @@ fn div_assign(&mut self, other: $t) { *self /= other }
|
||||
|
||||
div_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
||||
|
||||
/// The `RemAssign` trait is used to specify the functionality of `%=`.
|
||||
/// The remainder assignment operator `%=`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1529,7 +1529,7 @@ fn rem_assign(&mut self, other: $t) { *self %= other }
|
||||
|
||||
rem_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
||||
|
||||
/// The `BitAndAssign` trait is used to specify the functionality of `&=`.
|
||||
/// The bitwise AND assignment operator `&=`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1615,7 +1615,7 @@ fn bitand_assign(&mut self, other: $t) { *self &= other }
|
||||
|
||||
bitand_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
|
||||
|
||||
/// The `BitOrAssign` trait is used to specify the functionality of `|=`.
|
||||
/// The bitwise OR assignment operator `|=`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1659,7 +1659,7 @@ fn bitor_assign(&mut self, other: $t) { *self |= other }
|
||||
|
||||
bitor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
|
||||
|
||||
/// The `BitXorAssign` trait is used to specify the functionality of `^=`.
|
||||
/// The bitwise XOR assignment operator `^=`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1703,7 +1703,7 @@ fn bitxor_assign(&mut self, other: $t) { *self ^= other }
|
||||
|
||||
bitxor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
|
||||
|
||||
/// The `ShlAssign` trait is used to specify the functionality of `<<=`.
|
||||
/// The left shift assignment operator `<<=`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1768,7 +1768,7 @@ macro_rules! shl_assign_impl_all {
|
||||
|
||||
shl_assign_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
|
||||
|
||||
/// The `ShrAssign` trait is used to specify the functionality of `>>=`.
|
||||
/// The right shift assignment operator `>>=`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user