|
87 | 87 | message="cannot add `{RHS}` to `{Self}`",
|
88 | 88 | label="no implementation for `{Self} + {RHS}`",
|
89 | 89 | )]
|
| 90 | +#[doc(alias = "+")] |
90 | 91 | pub trait Add<RHS=Self> {
|
91 | 92 | /// The resulting type after applying the `+` operator.
|
92 | 93 | #[stable(feature = "rust1", since = "1.0.0")]
|
@@ -183,6 +184,7 @@ add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
183 | 184 | #[stable(feature = "rust1", since = "1.0.0")]
|
184 | 185 | #[rustc_on_unimplemented(message="cannot subtract `{RHS}` from `{Self}`",
|
185 | 186 | label="no implementation for `{Self} - {RHS}`")]
|
| 187 | +#[doc(alias = "-")] |
186 | 188 | pub trait Sub<RHS=Self> {
|
187 | 189 | /// The resulting type after applying the `-` operator.
|
188 | 190 | #[stable(feature = "rust1", since = "1.0.0")]
|
@@ -301,6 +303,7 @@ sub_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
301 | 303 | #[stable(feature = "rust1", since = "1.0.0")]
|
302 | 304 | #[rustc_on_unimplemented(message="cannot multiply `{RHS}` to `{Self}`",
|
303 | 305 | label="no implementation for `{Self} * {RHS}`")]
|
| 306 | +#[doc(alias = "*")] |
304 | 307 | pub trait Mul<RHS=Self> {
|
305 | 308 | /// The resulting type after applying the `*` operator.
|
306 | 309 | #[stable(feature = "rust1", since = "1.0.0")]
|
@@ -423,6 +426,7 @@ mul_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
423 | 426 | #[stable(feature = "rust1", since = "1.0.0")]
|
424 | 427 | #[rustc_on_unimplemented(message="cannot divide `{Self}` by `{RHS}`",
|
425 | 428 | label="no implementation for `{Self} / {RHS}`")]
|
| 429 | +#[doc(alias = "/")] |
426 | 430 | pub trait Div<RHS=Self> {
|
427 | 431 | /// The resulting type after applying the `/` operator.
|
428 | 432 | #[stable(feature = "rust1", since = "1.0.0")]
|
@@ -506,6 +510,7 @@ div_impl_float! { f32 f64 }
|
506 | 510 | #[stable(feature = "rust1", since = "1.0.0")]
|
507 | 511 | #[rustc_on_unimplemented(message="cannot mod `{Self}` by `{RHS}`",
|
508 | 512 | label="no implementation for `{Self} % {RHS}`")]
|
| 513 | +#[doc(alias = "%")] |
509 | 514 | pub trait Rem<RHS=Self> {
|
510 | 515 | /// The resulting type after applying the `%` operator.
|
511 | 516 | #[stable(feature = "rust1", since = "1.0.0")]
|
@@ -589,6 +594,7 @@ rem_impl_float! { f32 f64 }
|
589 | 594 | /// ```
|
590 | 595 | #[lang = "neg"]
|
591 | 596 | #[stable(feature = "rust1", since = "1.0.0")]
|
| 597 | +#[doc(alias = "-")] |
592 | 598 | pub trait Neg {
|
593 | 599 | /// The resulting type after applying the `-` operator.
|
594 | 600 | #[stable(feature = "rust1", since = "1.0.0")]
|
@@ -664,6 +670,8 @@ neg_impl_numeric! { isize i8 i16 i32 i64 i128 f32 f64 }
|
664 | 670 | #[stable(feature = "op_assign_traits", since = "1.8.0")]
|
665 | 671 | #[rustc_on_unimplemented(message="cannot add-assign `{Rhs}` to `{Self}`",
|
666 | 672 | label="no implementation for `{Self} += {Rhs}`")]
|
| 673 | +#[doc(alias = "+")] |
| 674 | +#[doc(alias = "+=")] |
667 | 675 | pub trait AddAssign<Rhs=Self> {
|
668 | 676 | /// Performs the `+=` operation.
|
669 | 677 | #[stable(feature = "op_assign_traits", since = "1.8.0")]
|
@@ -718,6 +726,8 @@ add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
718 | 726 | #[stable(feature = "op_assign_traits", since = "1.8.0")]
|
719 | 727 | #[rustc_on_unimplemented(message="cannot subtract-assign `{Rhs}` from `{Self}`",
|
720 | 728 | label="no implementation for `{Self} -= {Rhs}`")]
|
| 729 | +#[doc(alias = "-")] |
| 730 | +#[doc(alias = "-=")] |
721 | 731 | pub trait SubAssign<Rhs=Self> {
|
722 | 732 | /// Performs the `-=` operation.
|
723 | 733 | #[stable(feature = "op_assign_traits", since = "1.8.0")]
|
@@ -763,6 +773,8 @@ sub_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
763 | 773 | #[stable(feature = "op_assign_traits", since = "1.8.0")]
|
764 | 774 | #[rustc_on_unimplemented(message="cannot multiply-assign `{Rhs}` to `{Self}`",
|
765 | 775 | label="no implementation for `{Self} *= {Rhs}`")]
|
| 776 | +#[doc(alias = "*")] |
| 777 | +#[doc(alias = "*=")] |
766 | 778 | pub trait MulAssign<Rhs=Self> {
|
767 | 779 | /// Performs the `*=` operation.
|
768 | 780 | #[stable(feature = "op_assign_traits", since = "1.8.0")]
|
@@ -808,6 +820,8 @@ mul_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
808 | 820 | #[stable(feature = "op_assign_traits", since = "1.8.0")]
|
809 | 821 | #[rustc_on_unimplemented(message="cannot divide-assign `{Self}` by `{Rhs}`",
|
810 | 822 | label="no implementation for `{Self} /= {Rhs}`")]
|
| 823 | +#[doc(alias = "/")] |
| 824 | +#[doc(alias = "/=")] |
811 | 825 | pub trait DivAssign<Rhs=Self> {
|
812 | 826 | /// Performs the `/=` operation.
|
813 | 827 | #[stable(feature = "op_assign_traits", since = "1.8.0")]
|
@@ -856,6 +870,8 @@ div_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
|
856 | 870 | #[stable(feature = "op_assign_traits", since = "1.8.0")]
|
857 | 871 | #[rustc_on_unimplemented(message="cannot mod-assign `{Self}` by `{Rhs}``",
|
858 | 872 | label="no implementation for `{Self} %= {Rhs}`")]
|
| 873 | +#[doc(alias = "%")] |
| 874 | +#[doc(alias = "%=")] |
859 | 875 | pub trait RemAssign<Rhs=Self> {
|
860 | 876 | /// Performs the `%=` operation.
|
861 | 877 | #[stable(feature = "op_assign_traits", since = "1.8.0")]
|
|
0 commit comments