Skip to content

Commit e1448de

Browse files
Rollup merge of rust-lang#133019 - sorairolake:add-missing-period-and-colon, r=tgross35
docs: Fix missing period and colon in methods for primitive types Closes rust-lang#133018
2 parents b1d31d2 + ce2e318 commit e1448de

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

core/src/num/int_macros.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ macro_rules! int_impl {
13001300
}
13011301
}
13021302

1303-
/// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`
1303+
/// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.
13041304
///
13051305
/// If `rhs` is larger or equal to the number of bits in `self`,
13061306
/// the entire value is shifted out, and `0` is returned.
@@ -1423,7 +1423,7 @@ macro_rules! int_impl {
14231423
}
14241424
}
14251425

1426-
/// Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`
1426+
/// Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.
14271427
///
14281428
/// If `rhs` is larger or equal to the number of bits in `self`,
14291429
/// the entire value is shifted out, which yields `0` for a positive number,
@@ -2389,7 +2389,7 @@ macro_rules! int_impl {
23892389
(res, overflowed ^ (rhs < 0))
23902390
}
23912391

2392-
/// Calculates `self` - `rhs`
2392+
/// Calculates `self` - `rhs`.
23932393
///
23942394
/// Returns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow
23952395
/// would occur. If an overflow would have occurred then the wrapped value is returned.
@@ -2470,7 +2470,7 @@ macro_rules! int_impl {
24702470
(c, b != d)
24712471
}
24722472

2473-
/// Calculates `self` - `rhs` with an unsigned `rhs`
2473+
/// Calculates `self` - `rhs` with an unsigned `rhs`.
24742474
///
24752475
/// Returns a tuple of the subtraction along with a boolean indicating
24762476
/// whether an arithmetic overflow would occur. If an overflow would

core/src/num/uint_macros.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ macro_rules! uint_impl {
15171517
}
15181518
}
15191519

1520-
/// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`
1520+
/// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.
15211521
///
15221522
/// If `rhs` is larger or equal to the number of bits in `self`,
15231523
/// the entire value is shifted out, and `0` is returned.
@@ -1640,7 +1640,7 @@ macro_rules! uint_impl {
16401640
}
16411641
}
16421642

1643-
/// Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`
1643+
/// Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.
16441644
///
16451645
/// If `rhs` is larger or equal to the number of bits in `self`,
16461646
/// the entire value is shifted out, and `0` is returned.
@@ -2299,7 +2299,7 @@ macro_rules! uint_impl {
22992299
///
23002300
/// # Examples
23012301
///
2302-
/// Basic usage
2302+
/// Basic usage:
23032303
///
23042304
/// ```
23052305
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_add(2), (7, false));")]
@@ -2389,15 +2389,15 @@ macro_rules! uint_impl {
23892389
(res, overflowed ^ (rhs < 0))
23902390
}
23912391

2392-
/// Calculates `self` - `rhs`
2392+
/// Calculates `self` - `rhs`.
23932393
///
23942394
/// Returns a tuple of the subtraction along with a boolean indicating
23952395
/// whether an arithmetic overflow would occur. If an overflow would
23962396
/// have occurred then the wrapped value is returned.
23972397
///
23982398
/// # Examples
23992399
///
2400-
/// Basic usage
2400+
/// Basic usage:
24012401
///
24022402
/// ```
24032403
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_sub(2), (3, false));")]
@@ -2550,7 +2550,7 @@ macro_rules! uint_impl {
25502550
///
25512551
/// # Examples
25522552
///
2553-
/// Basic usage
2553+
/// Basic usage:
25542554
///
25552555
/// ```
25562556
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_div(2), (2, false));")]
@@ -2581,7 +2581,7 @@ macro_rules! uint_impl {
25812581
///
25822582
/// # Examples
25832583
///
2584-
/// Basic usage
2584+
/// Basic usage:
25852585
///
25862586
/// ```
25872587
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_div_euclid(2), (2, false));")]
@@ -2609,7 +2609,7 @@ macro_rules! uint_impl {
26092609
///
26102610
/// # Examples
26112611
///
2612-
/// Basic usage
2612+
/// Basic usage:
26132613
///
26142614
/// ```
26152615
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_rem(2), (1, false));")]
@@ -2640,7 +2640,7 @@ macro_rules! uint_impl {
26402640
///
26412641
/// # Examples
26422642
///
2643-
/// Basic usage
2643+
/// Basic usage:
26442644
///
26452645
/// ```
26462646
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_rem_euclid(2), (1, false));")]
@@ -2664,7 +2664,7 @@ macro_rules! uint_impl {
26642664
///
26652665
/// # Examples
26662666
///
2667-
/// Basic usage
2667+
/// Basic usage:
26682668
///
26692669
/// ```
26702670
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".overflowing_neg(), (0, false));")]
@@ -2689,7 +2689,7 @@ macro_rules! uint_impl {
26892689
///
26902690
/// # Examples
26912691
///
2692-
/// Basic usage
2692+
/// Basic usage:
26932693
///
26942694
/// ```
26952695
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".overflowing_shl(4), (0x10, false));")]
@@ -2715,7 +2715,7 @@ macro_rules! uint_impl {
27152715
///
27162716
/// # Examples
27172717
///
2718-
/// Basic usage
2718+
/// Basic usage:
27192719
///
27202720
/// ```
27212721
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(4), (0x1, false));")]

core/src/str/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2400,7 +2400,7 @@ impl str {
24002400
///
24012401
/// # Examples
24022402
///
2403-
/// Basic usage
2403+
/// Basic usage:
24042404
///
24052405
/// ```
24062406
/// let four: u32 = "4".parse().unwrap();

0 commit comments

Comments
 (0)