Skip to content

Commit 6182084

Browse files
committed
Improve documentation of checked_* functions
1 parent 8dbe632 commit 6182084

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/num/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pub trait Int
284284
/// ```
285285
fn checked_add(self, other: Self) -> Option<Self>;
286286

287-
/// Checked integer subtraction. Computes `self + other`, returning `None`
287+
/// Checked integer subtraction. Computes `self - other`, returning `None`
288288
/// if underflow occurred.
289289
///
290290
/// # Example
@@ -297,7 +297,7 @@ pub trait Int
297297
/// ```
298298
fn checked_sub(self, other: Self) -> Option<Self>;
299299

300-
/// Checked integer multiplication. Computes `self + other`, returning
300+
/// Checked integer multiplication. Computes `self * other`, returning
301301
/// `None` if underflow or overflow occurred.
302302
///
303303
/// # Example
@@ -310,8 +310,8 @@ pub trait Int
310310
/// ```
311311
fn checked_mul(self, other: Self) -> Option<Self>;
312312

313-
/// Checked integer division. Computes `self + other` returning `None` if
314-
/// `self == 0` or the operation results in underflow or overflow.
313+
/// Checked integer division. Computes `self / other`, returning `None` if
314+
/// `other == 0` or the operation results in underflow or overflow.
315315
///
316316
/// # Example
317317
///

0 commit comments

Comments
 (0)