Skip to content

Commit 1e920b6

Browse files
matthiaskrgrgitbot
authored and
gitbot
committed
Rollup merge of rust-lang#133530 - timvisee:master, r=jhpratt
Use consistent wording in docs, use is zero instead of is 0 In documentation, wording of _"`rhs` is zero"_ and _"`rhs` is 0"_ is intermixed. This is especially visible [here](https://doc.rust-lang.org/std/primitive.usize.html#method.div_ceil). This changes all occurrences to _"`rhs` is zero"_ for better readability.
2 parents 0c85290 + 556a319 commit 1e920b6

File tree

8 files changed

+52
-52
lines changed

8 files changed

+52
-52
lines changed

alloc/src/collections/binary_heap/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ impl<T: Ord> BinaryHeap<T> {
452452
///
453453
/// The binary heap will be able to hold at least `capacity` elements without
454454
/// reallocating. This method is allowed to allocate for more elements than
455-
/// `capacity`. If `capacity` is 0, the binary heap will not allocate.
455+
/// `capacity`. If `capacity` is zero, the binary heap will not allocate.
456456
///
457457
/// # Examples
458458
///
@@ -496,7 +496,7 @@ impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
496496
///
497497
/// The binary heap will be able to hold at least `capacity` elements without
498498
/// reallocating. This method is allowed to allocate for more elements than
499-
/// `capacity`. If `capacity` is 0, the binary heap will not allocate.
499+
/// `capacity`. If `capacity` is zero, the binary heap will not allocate.
500500
///
501501
/// # Examples
502502
///

alloc/src/vec/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ impl<T> Vec<T> {
427427
///
428428
/// The vector will be able to hold at least `capacity` elements without
429429
/// reallocating. This method is allowed to allocate for more elements than
430-
/// `capacity`. If `capacity` is 0, the vector will not allocate.
430+
/// `capacity`. If `capacity` is zero, the vector will not allocate.
431431
///
432432
/// It is important to note that although the returned vector has the
433433
/// minimum *capacity* specified, the vector will have a zero *length*. For
@@ -487,7 +487,7 @@ impl<T> Vec<T> {
487487
///
488488
/// The vector will be able to hold at least `capacity` elements without
489489
/// reallocating. This method is allowed to allocate for more elements than
490-
/// `capacity`. If `capacity` is 0, the vector will not allocate.
490+
/// `capacity`. If `capacity` is zero, the vector will not allocate.
491491
///
492492
/// # Errors
493493
///
@@ -745,7 +745,7 @@ impl<T, A: Allocator> Vec<T, A> {
745745
///
746746
/// The vector will be able to hold at least `capacity` elements without
747747
/// reallocating. This method is allowed to allocate for more elements than
748-
/// `capacity`. If `capacity` is 0, the vector will not allocate.
748+
/// `capacity`. If `capacity` is zero, the vector will not allocate.
749749
///
750750
/// It is important to note that although the returned vector has the
751751
/// minimum *capacity* specified, the vector will have a zero *length*. For
@@ -808,7 +808,7 @@ impl<T, A: Allocator> Vec<T, A> {
808808
///
809809
/// The vector will be able to hold at least `capacity` elements without
810810
/// reallocating. This method is allowed to allocate for more elements than
811-
/// `capacity`. If `capacity` is 0, the vector will not allocate.
811+
/// `capacity`. If `capacity` is zero, the vector will not allocate.
812812
///
813813
/// # Errors
814814
///

core/src/iter/traits/iterator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ pub trait Iterator {
15531553
///
15541554
/// # Panics
15551555
///
1556-
/// Panics if `N` is 0. This check will most probably get changed to a
1556+
/// Panics if `N` is zero. This check will most probably get changed to a
15571557
/// compile time error before this method gets stabilized.
15581558
///
15591559
/// ```should_panic
@@ -3454,7 +3454,7 @@ pub trait Iterator {
34543454
///
34553455
/// # Panics
34563456
///
3457-
/// Panics if `N` is 0.
3457+
/// Panics if `N` is zero.
34583458
///
34593459
/// # Examples
34603460
///

core/src/num/int_macros.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ macro_rules! int_impl {
18281828
///
18291829
/// # Panics
18301830
///
1831-
/// This function will panic if `rhs` is 0.
1831+
/// This function will panic if `rhs` is zero.
18321832
///
18331833
/// # Examples
18341834
///
@@ -1986,7 +1986,7 @@ macro_rules! int_impl {
19861986
///
19871987
/// # Panics
19881988
///
1989-
/// This function will panic if `rhs` is 0.
1989+
/// This function will panic if `rhs` is zero.
19901990
///
19911991
/// # Examples
19921992
///
@@ -2014,7 +2014,7 @@ macro_rules! int_impl {
20142014
///
20152015
/// # Panics
20162016
///
2017-
/// This function will panic if `rhs` is 0.
2017+
/// This function will panic if `rhs` is zero.
20182018
///
20192019
/// # Examples
20202020
///
@@ -2042,7 +2042,7 @@ macro_rules! int_impl {
20422042
///
20432043
/// # Panics
20442044
///
2045-
/// This function will panic if `rhs` is 0.
2045+
/// This function will panic if `rhs` is zero.
20462046
///
20472047
/// # Examples
20482048
///
@@ -2069,7 +2069,7 @@ macro_rules! int_impl {
20692069
///
20702070
/// # Panics
20712071
///
2072-
/// This function will panic if `rhs` is 0.
2072+
/// This function will panic if `rhs` is zero.
20732073
///
20742074
/// # Examples
20752075
///
@@ -2526,7 +2526,7 @@ macro_rules! int_impl {
25262526
///
25272527
/// # Panics
25282528
///
2529-
/// This function will panic if `rhs` is 0.
2529+
/// This function will panic if `rhs` is zero.
25302530
///
25312531
/// # Examples
25322532
///
@@ -2557,7 +2557,7 @@ macro_rules! int_impl {
25572557
///
25582558
/// # Panics
25592559
///
2560-
/// This function will panic if `rhs` is 0.
2560+
/// This function will panic if `rhs` is zero.
25612561
///
25622562
/// # Examples
25632563
///
@@ -2588,7 +2588,7 @@ macro_rules! int_impl {
25882588
///
25892589
/// # Panics
25902590
///
2591-
/// This function will panic if `rhs` is 0.
2591+
/// This function will panic if `rhs` is zero.
25922592
///
25932593
/// # Examples
25942594
///
@@ -2619,7 +2619,7 @@ macro_rules! int_impl {
26192619
///
26202620
/// # Panics
26212621
///
2622-
/// This function will panic if `rhs` is 0.
2622+
/// This function will panic if `rhs` is zero.
26232623
///
26242624
/// # Examples
26252625
///
@@ -2887,7 +2887,7 @@ macro_rules! int_impl {
28872887
///
28882888
/// # Panics
28892889
///
2890-
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
2890+
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
28912891
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
28922892
///
28932893
/// # Examples
@@ -2926,7 +2926,7 @@ macro_rules! int_impl {
29262926
///
29272927
/// # Panics
29282928
///
2929-
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN` and
2929+
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN` and
29302930
/// `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
29312931
///
29322932
/// # Examples
@@ -2975,7 +2975,7 @@ macro_rules! int_impl {
29752975
///
29762976
/// # Panics
29772977
///
2978-
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
2978+
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
29792979
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
29802980
///
29812981
/// # Examples
@@ -3019,7 +3019,7 @@ macro_rules! int_impl {
30193019
///
30203020
/// # Panics
30213021
///
3022-
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
3022+
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
30233023
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
30243024
///
30253025
/// # Examples

core/src/num/uint_macros.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ macro_rules! uint_impl {
18771877
///
18781878
/// # Panics
18791879
///
1880-
/// This function will panic if `rhs` is 0.
1880+
/// This function will panic if `rhs` is zero.
18811881
///
18821882
/// # Examples
18831883
///
@@ -2034,7 +2034,7 @@ macro_rules! uint_impl {
20342034
///
20352035
/// # Panics
20362036
///
2037-
/// This function will panic if `rhs` is 0.
2037+
/// This function will panic if `rhs` is zero.
20382038
///
20392039
/// # Examples
20402040
///
@@ -2063,7 +2063,7 @@ macro_rules! uint_impl {
20632063
///
20642064
/// # Panics
20652065
///
2066-
/// This function will panic if `rhs` is 0.
2066+
/// This function will panic if `rhs` is zero.
20672067
///
20682068
/// # Examples
20692069
///
@@ -2091,7 +2091,7 @@ macro_rules! uint_impl {
20912091
///
20922092
/// # Panics
20932093
///
2094-
/// This function will panic if `rhs` is 0.
2094+
/// This function will panic if `rhs` is zero.
20952095
///
20962096
/// # Examples
20972097
///
@@ -2121,7 +2121,7 @@ macro_rules! uint_impl {
21212121
///
21222122
/// # Panics
21232123
///
2124-
/// This function will panic if `rhs` is 0.
2124+
/// This function will panic if `rhs` is zero.
21252125
///
21262126
/// # Examples
21272127
///
@@ -2545,7 +2545,7 @@ macro_rules! uint_impl {
25452545
///
25462546
/// # Panics
25472547
///
2548-
/// This function will panic if `rhs` is 0.
2548+
/// This function will panic if `rhs` is zero.
25492549
///
25502550
/// # Examples
25512551
///
@@ -2576,7 +2576,7 @@ macro_rules! uint_impl {
25762576
///
25772577
/// # Panics
25782578
///
2579-
/// This function will panic if `rhs` is 0.
2579+
/// This function will panic if `rhs` is zero.
25802580
///
25812581
/// # Examples
25822582
///
@@ -2604,7 +2604,7 @@ macro_rules! uint_impl {
26042604
///
26052605
/// # Panics
26062606
///
2607-
/// This function will panic if `rhs` is 0.
2607+
/// This function will panic if `rhs` is zero.
26082608
///
26092609
/// # Examples
26102610
///
@@ -2635,7 +2635,7 @@ macro_rules! uint_impl {
26352635
///
26362636
/// # Panics
26372637
///
2638-
/// This function will panic if `rhs` is 0.
2638+
/// This function will panic if `rhs` is zero.
26392639
///
26402640
/// # Examples
26412641
///
@@ -2872,7 +2872,7 @@ macro_rules! uint_impl {
28722872
///
28732873
/// # Panics
28742874
///
2875-
/// This function will panic if `rhs` is 0.
2875+
/// This function will panic if `rhs` is zero.
28762876
///
28772877
/// # Examples
28782878
///
@@ -2900,7 +2900,7 @@ macro_rules! uint_impl {
29002900
///
29012901
/// # Panics
29022902
///
2903-
/// This function will panic if `rhs` is 0.
2903+
/// This function will panic if `rhs` is zero.
29042904
///
29052905
/// # Examples
29062906
///

0 commit comments

Comments
 (0)