diff options
| author | Irfan Hudda <irfanhudda@gmail.com> | 2017-04-29 00:06:54 +0530 |
|---|---|---|
| committer | Irfan Hudda <irfanhudda@gmail.com> | 2017-04-29 00:06:54 +0530 |
| commit | 67684a399c2020495075b2e6c848850e7a8d60e9 (patch) | |
| tree | d38ce65aee8b7d7ba85aa4b2af86959f7d92a3e3 | |
| parent | 8f9caff988954ab19f4a242d905aa6092a03bddd (diff) | |
| download | rust-67684a399c2020495075b2e6c848850e7a8d60e9.tar.gz rust-67684a399c2020495075b2e6c848850e7a8d60e9.zip | |
Add comment about overflow behavior for next_power_of_two
| -rw-r--r-- | src/libcore/num/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 0c7832168bb..8c4a6e871e1 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -2340,6 +2340,9 @@ macro_rules! uint_impl { } /// Returns the smallest power of two greater than or equal to `self`. + /// When return value overflows, it panics in debug mode and return + /// value is wrapped in release mode. + /// /// More details about overflow behavior can be found in [RFC 560]. /// /// # Examples |
