Skip to content

Commit 67684a3

Browse files
committed
Add comment about overflow behavior for next_power_of_two
1 parent 8f9caff commit 67684a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libcore/num/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2340,6 +2340,9 @@ macro_rules! uint_impl {
23402340
}
23412341

23422342
/// Returns the smallest power of two greater than or equal to `self`.
2343+
/// When return value overflows, it panics in debug mode and return
2344+
/// value is wrapped in release mode.
2345+
///
23432346
/// More details about overflow behavior can be found in [RFC 560].
23442347
///
23452348
/// # Examples

0 commit comments

Comments
 (0)