Skip to content

Commit

Permalink
Rollup merge of rust-lang#131391 - ChaiTRex:isqrt, r=scottmcm,tgross35
Browse files Browse the repository at this point in the history
Stabilize `isqrt` feature

Stabilizes the `isqrt` feature. FCP is incomplete.

Closes rust-lang#116226
  • Loading branch information
matthiaskrgr authored Oct 28, 2024
2 parents 848fcd5 + fcc990d commit 8cdb783
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 15 deletions.
1 change: 0 additions & 1 deletion core/benches/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#![feature(iter_array_chunks)]
#![feature(iter_next_chunk)]
#![feature(iter_advance_by)]
#![feature(isqrt)]

extern crate test;

Expand Down
1 change: 0 additions & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@
#![feature(ip)]
#![feature(is_ascii_octdigit)]
#![feature(is_val_statically_known)]
#![feature(isqrt)]
#![feature(lazy_get)]
#![feature(link_cfg)]
#![feature(non_null_from_ref)]
Expand Down
10 changes: 4 additions & 6 deletions core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1629,11 +1629,10 @@ macro_rules! int_impl {
///
/// Basic usage:
/// ```
/// #![feature(isqrt)]
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".checked_isqrt(), Some(3));")]
/// ```
#[unstable(feature = "isqrt", issue = "116226")]
#[rustc_const_unstable(feature = "isqrt", issue = "116226")]
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down Expand Up @@ -2880,11 +2879,10 @@ macro_rules! int_impl {
///
/// Basic usage:
/// ```
/// #![feature(isqrt)]
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".isqrt(), 3);")]
/// ```
#[unstable(feature = "isqrt", issue = "116226")]
#[rustc_const_unstable(feature = "isqrt", issue = "116226")]
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down
5 changes: 2 additions & 3 deletions core/src/num/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,6 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
///
/// Basic usage:
/// ```
/// #![feature(isqrt)]
/// # use std::num::NonZero;
/// #
/// # fn main() { test().unwrap(); }
Expand All @@ -1539,8 +1538,8 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
/// # Some(())
/// # }
/// ```
#[unstable(feature = "isqrt", issue = "116226")]
#[rustc_const_unstable(feature = "isqrt", issue = "116226")]
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down
5 changes: 2 additions & 3 deletions core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2753,11 +2753,10 @@ macro_rules! uint_impl {
///
/// Basic usage:
/// ```
/// #![feature(isqrt)]
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".isqrt(), 3);")]
/// ```
#[unstable(feature = "isqrt", issue = "116226")]
#[rustc_const_unstable(feature = "isqrt", issue = "116226")]
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
Expand Down
1 change: 0 additions & 1 deletion core/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#![feature(ip)]
#![feature(ip_from)]
#![feature(is_ascii_octdigit)]
#![feature(isqrt)]
#![feature(iter_advance_by)]
#![feature(iter_array_chunks)]
#![feature(iter_chain)]
Expand Down

0 comments on commit 8cdb783

Please sign in to comment.