We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c398efc commit f7c641bCopy full SHA for f7c641b
src/libcore/num/mod.rs
@@ -2328,7 +2328,7 @@ macro_rules! uint_impl {
2328
}
2329
2330
/// Returns the smallest power of two greater than or equal to `self`.
2331
- /// Unspecified behavior on overflow.
+ /// More details about overflow behavior can be found in [RFC 560].
2332
///
2333
/// # Examples
2334
@@ -2338,6 +2338,8 @@ macro_rules! uint_impl {
2338
/// assert_eq!(2u8.next_power_of_two(), 2);
2339
/// assert_eq!(3u8.next_power_of_two(), 4);
2340
/// ```
2341
+ ///
2342
+ /// [RFC 560]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
2343
#[stable(feature = "rust1", since = "1.0.0")]
2344
#[inline]
2345
pub fn next_power_of_two(self) -> Self {
0 commit comments