Skip to content

Commit bae772b

Browse files
committed
Rollup merge of rust-lang#40818 - theotherphil:master, r=steveklabnik
Don't stutter in operator trait descriptions Fixes first item on rust-lang#29365. r? @steveklabnik
2 parents 1fe2dfc + 8b92255 commit bae772b

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

Diff for: src/libcore/ops.rs

+22-22
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ pub trait Drop {
196196
fn drop(&mut self);
197197
}
198198

199-
/// The `Add` trait is used to specify the functionality of `+`.
199+
/// The addition operator `+`.
200200
///
201201
/// # Examples
202202
///
@@ -269,7 +269,7 @@ macro_rules! add_impl {
269269

270270
add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
271271

272-
/// The `Sub` trait is used to specify the functionality of `-`.
272+
/// The subtraction operator `-`.
273273
///
274274
/// # Examples
275275
///
@@ -342,7 +342,7 @@ macro_rules! sub_impl {
342342

343343
sub_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
344344

345-
/// The `Mul` trait is used to specify the functionality of `*`.
345+
/// The multiplication operator `*`.
346346
///
347347
/// # Examples
348348
///
@@ -464,7 +464,7 @@ macro_rules! mul_impl {
464464

465465
mul_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
466466

467-
/// The `Div` trait is used to specify the functionality of `/`.
467+
/// The division operator `/`.
468468
///
469469
/// # Examples
470470
///
@@ -609,7 +609,7 @@ macro_rules! div_impl_float {
609609

610610
div_impl_float! { f32 f64 }
611611

612-
/// The `Rem` trait is used to specify the functionality of `%`.
612+
/// The remainder operator `%`.
613613
///
614614
/// # Examples
615615
///
@@ -689,7 +689,7 @@ macro_rules! rem_impl_float {
689689

690690
rem_impl_float! { f32 f64 }
691691

692-
/// The `Neg` trait is used to specify the functionality of unary `-`.
692+
/// The unary negation operator `-`.
693693
///
694694
/// # Examples
695695
///
@@ -768,7 +768,7 @@ macro_rules! neg_impl_unsigned {
768768
// neg_impl_unsigned! { usize u8 u16 u32 u64 }
769769
neg_impl_numeric! { isize i8 i16 i32 i64 i128 f32 f64 }
770770

771-
/// The `Not` trait is used to specify the functionality of unary `!`.
771+
/// The unary logical negation operator `!`.
772772
///
773773
/// # Examples
774774
///
@@ -826,7 +826,7 @@ macro_rules! not_impl {
826826

827827
not_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
828828

829-
/// The `BitAnd` trait is used to specify the functionality of `&`.
829+
/// The bitwise AND operator `&`.
830830
///
831831
/// # Examples
832832
///
@@ -909,7 +909,7 @@ macro_rules! bitand_impl {
909909

910910
bitand_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
911911

912-
/// The `BitOr` trait is used to specify the functionality of `|`.
912+
/// The bitwise OR operator `|`.
913913
///
914914
/// # Examples
915915
///
@@ -992,7 +992,7 @@ macro_rules! bitor_impl {
992992

993993
bitor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
994994

995-
/// The `BitXor` trait is used to specify the functionality of `^`.
995+
/// The bitwise XOR operator `^`.
996996
///
997997
/// # Examples
998998
///
@@ -1078,7 +1078,7 @@ macro_rules! bitxor_impl {
10781078

10791079
bitxor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
10801080

1081-
/// The `Shl` trait is used to specify the functionality of `<<`.
1081+
/// The left shift operator `<<`.
10821082
///
10831083
/// # Examples
10841084
///
@@ -1181,7 +1181,7 @@ macro_rules! shl_impl_all {
11811181

11821182
shl_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 isize i128 }
11831183

1184-
/// The `Shr` trait is used to specify the functionality of `>>`.
1184+
/// The right shift operator `>>`.
11851185
///
11861186
/// # Examples
11871187
///
@@ -1284,7 +1284,7 @@ macro_rules! shr_impl_all {
12841284

12851285
shr_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
12861286

1287-
/// The `AddAssign` trait is used to specify the functionality of `+=`.
1287+
/// The addition assignment operator `+=`.
12881288
///
12891289
/// # Examples
12901290
///
@@ -1340,7 +1340,7 @@ macro_rules! add_assign_impl {
13401340

13411341
add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
13421342

1343-
/// The `SubAssign` trait is used to specify the functionality of `-=`.
1343+
/// The subtraction assignment operator `-=`.
13441344
///
13451345
/// # Examples
13461346
///
@@ -1396,7 +1396,7 @@ macro_rules! sub_assign_impl {
13961396

13971397
sub_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
13981398

1399-
/// The `MulAssign` trait is used to specify the functionality of `*=`.
1399+
/// The multiplication assignment operator `*=`.
14001400
///
14011401
/// # Examples
14021402
///
@@ -1441,7 +1441,7 @@ macro_rules! mul_assign_impl {
14411441

14421442
mul_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
14431443

1444-
/// The `DivAssign` trait is used to specify the functionality of `/=`.
1444+
/// The division assignment operator `/=`.
14451445
///
14461446
/// # Examples
14471447
///
@@ -1485,7 +1485,7 @@ macro_rules! div_assign_impl {
14851485

14861486
div_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
14871487

1488-
/// The `RemAssign` trait is used to specify the functionality of `%=`.
1488+
/// The remainder assignment operator `%=`.
14891489
///
14901490
/// # Examples
14911491
///
@@ -1529,7 +1529,7 @@ macro_rules! rem_assign_impl {
15291529

15301530
rem_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
15311531

1532-
/// The `BitAndAssign` trait is used to specify the functionality of `&=`.
1532+
/// The bitwise AND assignment operator `&=`.
15331533
///
15341534
/// # Examples
15351535
///
@@ -1615,7 +1615,7 @@ macro_rules! bitand_assign_impl {
16151615

16161616
bitand_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
16171617

1618-
/// The `BitOrAssign` trait is used to specify the functionality of `|=`.
1618+
/// The bitwise OR assignment operator `|=`.
16191619
///
16201620
/// # Examples
16211621
///
@@ -1659,7 +1659,7 @@ macro_rules! bitor_assign_impl {
16591659

16601660
bitor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
16611661

1662-
/// The `BitXorAssign` trait is used to specify the functionality of `^=`.
1662+
/// The bitwise XOR assignment operator `^=`.
16631663
///
16641664
/// # Examples
16651665
///
@@ -1703,7 +1703,7 @@ macro_rules! bitxor_assign_impl {
17031703

17041704
bitxor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
17051705

1706-
/// The `ShlAssign` trait is used to specify the functionality of `<<=`.
1706+
/// The left shift assignment operator `<<=`.
17071707
///
17081708
/// # Examples
17091709
///
@@ -1768,7 +1768,7 @@ macro_rules! shl_assign_impl_all {
17681768

17691769
shl_assign_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
17701770

1771-
/// The `ShrAssign` trait is used to specify the functionality of `>>=`.
1771+
/// The right shift assignment operator `>>=`.
17721772
///
17731773
/// # Examples
17741774
///

0 commit comments

Comments
 (0)