We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4919988 + 23045eb commit 27d5935Copy full SHA for 27d5935
library/core/src/num/nonzero.rs
@@ -915,15 +915,13 @@ macro_rules! nonzero_unsigned_is_power_of_two {
915
/// Basic usage:
916
///
917
/// ```
918
- /// #![feature(nonzero_is_power_of_two)]
919
- ///
920
#[doc = concat!("let eight = std::num::", stringify!($Ty), "::new(8).unwrap();")]
921
/// assert!(eight.is_power_of_two());
922
#[doc = concat!("let ten = std::num::", stringify!($Ty), "::new(10).unwrap();")]
923
/// assert!(!ten.is_power_of_two());
924
925
#[must_use]
926
- #[unstable(feature = "nonzero_is_power_of_two", issue = "81106")]
+ #[stable(feature = "nonzero_is_power_of_two", since = "1.59.0")]
927
#[inline]
928
pub const fn is_power_of_two(self) -> bool {
929
// LLVM 11 normalizes `unchecked_sub(x, 1) & x == 0` to the implementation seen here.
0 commit comments