@@ -242,6 +242,7 @@ pub trait Drop {
242242/// [std::time::SystemTime]: ../../std/time/struct.SystemTime.html
243243#[ lang = "add" ]
244244#[ stable( feature = "rust1" , since = "1.0.0" ) ]
245+ #[ rustc_on_unimplemented = "no implementation for `{Self} + {RHS}`" ]
245246pub trait Add < RHS =Self > {
246247 /// The resulting type after applying the `+` operator
247248 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -315,6 +316,7 @@ add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
315316/// [std::time::SystemTime]: ../../std/time/struct.SystemTime.html
316317#[ lang = "sub" ]
317318#[ stable( feature = "rust1" , since = "1.0.0" ) ]
319+ #[ rustc_on_unimplemented = "no implementation for `{Self} - {RHS}`" ]
318320pub trait Sub < RHS =Self > {
319321 /// The resulting type after applying the `-` operator
320322 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -437,6 +439,7 @@ sub_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
437439/// ```
438440#[ lang = "mul" ]
439441#[ stable( feature = "rust1" , since = "1.0.0" ) ]
442+ #[ rustc_on_unimplemented = "no implementation for `{Self} * {RHS}`" ]
440443pub trait Mul < RHS =Self > {
441444 /// The resulting type after applying the `*` operator
442445 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -565,6 +568,7 @@ mul_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
565568/// ```
566569#[ lang = "div" ]
567570#[ stable( feature = "rust1" , since = "1.0.0" ) ]
571+ #[ rustc_on_unimplemented = "no implementation for `{Self} / {RHS}`" ]
568572pub trait Div < RHS =Self > {
569573 /// The resulting type after applying the `/` operator
570574 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -644,6 +648,7 @@ div_impl_float! { f32 f64 }
644648/// ```
645649#[ lang = "rem" ]
646650#[ stable( feature = "rust1" , since = "1.0.0" ) ]
651+ #[ rustc_on_unimplemented = "no implementation for `{Self} % {RHS}`" ]
647652pub trait Rem < RHS =Self > {
648653 /// The resulting type after applying the `%` operator
649654 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -883,6 +888,7 @@ not_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
883888/// ```
884889#[ lang = "bitand" ]
885890#[ stable( feature = "rust1" , since = "1.0.0" ) ]
891+ #[ rustc_on_unimplemented = "no implementation for `{Self} & {RHS}`" ]
886892pub trait BitAnd < RHS =Self > {
887893 /// The resulting type after applying the `&` operator
888894 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -966,6 +972,7 @@ bitand_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
966972/// ```
967973#[ lang = "bitor" ]
968974#[ stable( feature = "rust1" , since = "1.0.0" ) ]
975+ #[ rustc_on_unimplemented = "no implementation for `{Self} | {RHS}`" ]
969976pub trait BitOr < RHS =Self > {
970977 /// The resulting type after applying the `|` operator
971978 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1052,6 +1059,7 @@ bitor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
10521059/// ```
10531060#[ lang = "bitxor" ]
10541061#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1062+ #[ rustc_on_unimplemented = "no implementation for `{Self} ^ {RHS}`" ]
10551063pub trait BitXor < RHS =Self > {
10561064 /// The resulting type after applying the `^` operator
10571065 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1134,6 +1142,7 @@ bitxor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
11341142/// ```
11351143#[ lang = "shl" ]
11361144#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1145+ #[ rustc_on_unimplemented = "no implementation for `{Self} << {RHS}`" ]
11371146pub trait Shl < RHS > {
11381147 /// The resulting type after applying the `<<` operator
11391148 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1237,6 +1246,7 @@ shl_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 isize i128 }
12371246/// ```
12381247#[ lang = "shr" ]
12391248#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1249+ #[ rustc_on_unimplemented = "no implementation for `{Self} >> {RHS}`" ]
12401250pub trait Shr < RHS > {
12411251 /// The resulting type after applying the `>>` operator
12421252 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1321,6 +1331,7 @@ shr_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
13211331/// ```
13221332#[ lang = "add_assign" ]
13231333#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
1334+ #[ rustc_on_unimplemented = "no implementation for `{Self} += {Rhs}`" ]
13241335pub trait AddAssign < Rhs =Self > {
13251336 /// The method for the `+=` operator
13261337 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
@@ -1377,6 +1388,7 @@ add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
13771388/// ```
13781389#[ lang = "sub_assign" ]
13791390#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
1391+ #[ rustc_on_unimplemented = "no implementation for `{Self} -= {Rhs}`" ]
13801392pub trait SubAssign < Rhs =Self > {
13811393 /// The method for the `-=` operator
13821394 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
@@ -1422,6 +1434,7 @@ sub_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
14221434/// ```
14231435#[ lang = "mul_assign" ]
14241436#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
1437+ #[ rustc_on_unimplemented = "no implementation for `{Self} *= {Rhs}`" ]
14251438pub trait MulAssign < Rhs =Self > {
14261439 /// The method for the `*=` operator
14271440 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
@@ -1467,6 +1480,7 @@ mul_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
14671480/// ```
14681481#[ lang = "div_assign" ]
14691482#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
1483+ #[ rustc_on_unimplemented = "no implementation for `{Self} /= {Rhs}`" ]
14701484pub trait DivAssign < Rhs =Self > {
14711485 /// The method for the `/=` operator
14721486 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
@@ -1511,6 +1525,7 @@ div_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
15111525/// ```
15121526#[ lang = "rem_assign" ]
15131527#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
1528+ #[ rustc_on_unimplemented = "no implementation for `{Self} %= {Rhs}`" ]
15141529pub trait RemAssign < Rhs =Self > {
15151530 /// The method for the `%=` operator
15161531 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
@@ -1597,6 +1612,7 @@ rem_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
15971612/// ```
15981613#[ lang = "bitand_assign" ]
15991614#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
1615+ #[ rustc_on_unimplemented = "no implementation for `{Self} &= {Rhs}`" ]
16001616pub trait BitAndAssign < Rhs =Self > {
16011617 /// The method for the `&=` operator
16021618 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
@@ -1641,6 +1657,7 @@ bitand_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
16411657/// ```
16421658#[ lang = "bitor_assign" ]
16431659#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
1660+ #[ rustc_on_unimplemented = "no implementation for `{Self} |= {Rhs}`" ]
16441661pub trait BitOrAssign < Rhs =Self > {
16451662 /// The method for the `|=` operator
16461663 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
@@ -1685,6 +1702,7 @@ bitor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
16851702/// ```
16861703#[ lang = "bitxor_assign" ]
16871704#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
1705+ #[ rustc_on_unimplemented = "no implementation for `{Self} ^= {Rhs}`" ]
16881706pub trait BitXorAssign < Rhs =Self > {
16891707 /// The method for the `^=` operator
16901708 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
@@ -1729,6 +1747,7 @@ bitxor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
17291747/// ```
17301748#[ lang = "shl_assign" ]
17311749#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
1750+ #[ rustc_on_unimplemented = "no implementation for `{Self} <<= {Rhs}`" ]
17321751pub trait ShlAssign < Rhs > {
17331752 /// The method for the `<<=` operator
17341753 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
@@ -1794,6 +1813,7 @@ shl_assign_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
17941813/// ```
17951814#[ lang = "shr_assign" ]
17961815#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
1816+ #[ rustc_on_unimplemented = "no implementation for `{Self} >>= {Rhs}`" ]
17971817pub trait ShrAssign < Rhs =Self > {
17981818 /// The method for the `>>=` operator
17991819 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
0 commit comments