Add inline attributes and add unit to CommonTypes

This commit is contained in:
John Kåre Alsaker
2018-11-29 21:13:04 +01:00
parent 3dde9e1322
commit 4cce4ffdef
9 changed files with 57 additions and 1 deletions

View File

@@ -3614,6 +3614,7 @@ assert_eq!(3", stringify!($SelfT), ".checked_next_power_of_two(), Some(4));
assert_eq!(", stringify!($SelfT), "::max_value().checked_next_power_of_two(), None);",
$EndFeature, "
```"),
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn checked_next_power_of_two(self) -> Option<Self> {
self.one_less_than_next_power_of_two().checked_add(1)