Content-Length: 309837 | pFad | https://github.com/model-checking/verify-rust-std/commit/2acb995e5583eb633edbd518ef531bb0a0df9cfa

28 Rollup merge of #126390 - Kriskras99:master, r=Nilstrieb · model-checking/verify-rust-std@2acb995 · GitHub
Skip to content

Commit 2acb995

Browse files
authored
Rollup merge of rust-lang#126390 - Kriskras99:master, r=Nilstrieb
Fix wording in {checked_}next_power_of_two Small documentation update
2 parents b3c1dcb + fa2a54a commit 2acb995

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/num/nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
10591059
unsafe { Self::new_unchecked(self.get().unchecked_add(other)) }
10601060
}
10611061

1062-
//github.com/ Returns the smallest power of two greater than or equal to n.
1062+
//github.com/ Returns the smallest power of two greater than or equal to `self`.
10631063
//github.com/ Checks for overflow and returns [`None`]
10641064
//github.com/ if the next power of two is greater than the type’s maximum value.
10651065
//github.com/ As a consequence, the result cannot wrap to zero.

core/src/num/uint_macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,7 +2830,7 @@ macro_rules! uint_impl {
28302830
//github.com/
28312831
//github.com/ When return value overflows (i.e., `self > (1 << (N-1))` for type
28322832
//github.com/ `uN`), it panics in debug mode and the return value is wrapped to 0 in
2833-
//github.com/ release mode (the only situation in which method can return 0).
2833+
//github.com/ release mode (the only situation in which this method can return 0).
28342834
//github.com/
28352835
//github.com/ # Examples
28362836
//github.com/
@@ -2851,7 +2851,7 @@ macro_rules! uint_impl {
28512851
self.one_less_than_next_power_of_two() + 1
28522852
}
28532853

2854-
//github.com/ Returns the smallest power of two greater than or equal to `n`. If
2854+
//github.com/ Returns the smallest power of two greater than or equal to `self`. If
28552855
//github.com/ the next power of two is greater than the type's maximum value,
28562856
//github.com/ `None` is returned, otherwise the power of two is wrapped in `Some`.
28572857
//github.com/

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/model-checking/verify-rust-std/commit/2acb995e5583eb633edbd518ef531bb0a0df9cfa

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy