@@ -1166,12 +1166,21 @@ extern "rust-intrinsic" {
1166
1166
pub fn bswap < T > ( x : T ) -> T ;
1167
1167
1168
1168
/// Performs checked integer addition.
1169
+ /// The stabilized versions of this intrinsic are available on the integer
1170
+ /// primitives via the `overflowing_add` method. For example,
1171
+ /// [`std::u32::overflowing_add`](../../std/primitive.u32.html#method.overflowing_add)
1169
1172
pub fn add_with_overflow < T > ( x : T , y : T ) -> ( T , bool ) ;
1170
1173
1171
1174
/// Performs checked integer subtraction
1175
+ /// The stabilized versions of this intrinsic are available on the integer
1176
+ /// primitives via the `overflowing_sub` method. For example,
1177
+ /// [`std::u32::overflowing_sub`](../../std/primitive.u32.html#method.overflowing_sub)
1172
1178
pub fn sub_with_overflow < T > ( x : T , y : T ) -> ( T , bool ) ;
1173
1179
1174
1180
/// Performs checked integer multiplication
1181
+ /// The stabilized versions of this intrinsic are available on the integer
1182
+ /// primitives via the `overflowing_mul` method. For example,
1183
+ /// [`std::u32::overflowing_mul`](../../std/primitive.u32.html#method.overflowing_mul)
1175
1184
pub fn mul_with_overflow < T > ( x : T , y : T ) -> ( T , bool ) ;
1176
1185
1177
1186
/// Performs an unchecked division, resulting in undefined behavior
@@ -1182,10 +1191,19 @@ extern "rust-intrinsic" {
1182
1191
pub fn unchecked_rem < T > ( x : T , y : T ) -> T ;
1183
1192
1184
1193
/// Returns (a + b) mod 2^N, where N is the width of T in bits.
1194
+ /// The stabilized versions of this intrinsic are available on the integer
1195
+ /// primitives via the `wrapping_add` method. For example,
1196
+ /// [`std::u32::wrapping_add`](../../std/primitive.u32.html#method.wrapping_add)
1185
1197
pub fn overflowing_add < T > ( a : T , b : T ) -> T ;
1186
1198
/// Returns (a - b) mod 2^N, where N is the width of T in bits.
1199
+ /// The stabilized versions of this intrinsic are available on the integer
1200
+ /// primitives via the `wrapping_sub` method. For example,
1201
+ /// [`std::u32::wrapping_sub`](../../std/primitive.u32.html#method.wrapping_sub)
1187
1202
pub fn overflowing_sub < T > ( a : T , b : T ) -> T ;
1188
1203
/// Returns (a * b) mod 2^N, where N is the width of T in bits.
1204
+ /// The stabilized versions of this intrinsic are available on the integer
1205
+ /// primitives via the `wrapping_mul` method. For example,
1206
+ /// [`std::u32::wrapping_mul`](../../std/primitive.u32.html#method.wrapping_mul)
1189
1207
pub fn overflowing_mul < T > ( a : T , b : T ) -> T ;
1190
1208
1191
1209
/// Returns the value of the discriminant for the variant in 'v',
0 commit comments