mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Stabilize feature isolate_most_least_significant_one
This commit is contained in:
@@ -173,14 +173,13 @@ pub const fn trailing_ones(self) -> u32 {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(isolate_most_least_significant_one)]
|
||||
///
|
||||
#[doc = concat!("let n: ", stringify!($SelfT), " = 0b_01100100;")]
|
||||
///
|
||||
/// assert_eq!(n.isolate_highest_one(), 0b_01000000);
|
||||
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_highest_one(), 0);")]
|
||||
/// ```
|
||||
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
|
||||
#[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline(always)]
|
||||
@@ -194,14 +193,13 @@ pub const fn isolate_highest_one(self) -> Self {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(isolate_most_least_significant_one)]
|
||||
///
|
||||
#[doc = concat!("let n: ", stringify!($SelfT), " = 0b_01100100;")]
|
||||
///
|
||||
/// assert_eq!(n.isolate_lowest_one(), 0b_00000100);
|
||||
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_lowest_one(), 0);")]
|
||||
/// ```
|
||||
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
|
||||
#[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline(always)]
|
||||
|
||||
@@ -650,8 +650,6 @@ pub const fn trailing_zeros(self) -> u32 {
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(isolate_most_least_significant_one)]
|
||||
///
|
||||
/// # use core::num::NonZero;
|
||||
/// # fn main() { test().unwrap(); }
|
||||
/// # fn test() -> Option<()> {
|
||||
@@ -662,7 +660,8 @@ pub const fn trailing_zeros(self) -> u32 {
|
||||
/// # Some(())
|
||||
/// # }
|
||||
/// ```
|
||||
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
|
||||
#[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline(always)]
|
||||
@@ -683,8 +682,6 @@ pub const fn isolate_highest_one(self) -> Self {
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(isolate_most_least_significant_one)]
|
||||
///
|
||||
/// # use core::num::NonZero;
|
||||
/// # fn main() { test().unwrap(); }
|
||||
/// # fn test() -> Option<()> {
|
||||
@@ -695,7 +692,8 @@ pub const fn isolate_highest_one(self) -> Self {
|
||||
/// # Some(())
|
||||
/// # }
|
||||
/// ```
|
||||
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
|
||||
#[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline(always)]
|
||||
|
||||
@@ -253,14 +253,13 @@ pub const fn bit_width(self) -> u32 {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(isolate_most_least_significant_one)]
|
||||
///
|
||||
#[doc = concat!("let n: ", stringify!($SelfT), " = 0b_01100100;")]
|
||||
///
|
||||
/// assert_eq!(n.isolate_highest_one(), 0b_01000000);
|
||||
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_highest_one(), 0);")]
|
||||
/// ```
|
||||
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
|
||||
#[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline(always)]
|
||||
@@ -274,14 +273,13 @@ pub const fn isolate_highest_one(self) -> Self {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(isolate_most_least_significant_one)]
|
||||
///
|
||||
#[doc = concat!("let n: ", stringify!($SelfT), " = 0b_01100100;")]
|
||||
///
|
||||
/// assert_eq!(n.isolate_lowest_one(), 0b_00000100);
|
||||
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_lowest_one(), 0);")]
|
||||
/// ```
|
||||
#[unstable(feature = "isolate_most_least_significant_one", issue = "136909")]
|
||||
#[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline(always)]
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
#![feature(int_roundings)]
|
||||
#![feature(ip)]
|
||||
#![feature(is_ascii_octdigit)]
|
||||
#![feature(isolate_most_least_significant_one)]
|
||||
#![feature(iter_advance_by)]
|
||||
#![feature(iter_array_chunks)]
|
||||
#![feature(iter_collect_into)]
|
||||
|
||||
Reference in New Issue
Block a user