Skip to content

Commit 204623a

Browse files
committed
Stabilize int_roundings
1 parent eaadb89 commit 204623a

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

compiler/rustc_codegen_ssa/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(once_cell)]
66
#![feature(associated_type_bounds)]
77
#![feature(strict_provenance)]
8-
#![feature(int_roundings)]
98
#![feature(if_let_guard)]
109
#![recursion_limit = "256"]
1110
#![allow(rustc::potential_query_instability)]

library/core/src/num/int_macros.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,6 @@ macro_rules! int_impl {
20332033
/// Basic usage:
20342034
///
20352035
/// ```
2036-
/// #![feature(int_roundings)]
20372036
#[doc = concat!("let a: ", stringify!($SelfT)," = 8;")]
20382037
/// let b = 3;
20392038
///
@@ -2042,7 +2041,8 @@ macro_rules! int_impl {
20422041
/// assert_eq!((-a).div_floor(b), -3);
20432042
/// assert_eq!((-a).div_floor(-b), 2);
20442043
/// ```
2045-
#[unstable(feature = "int_roundings", issue = "88581")]
2044+
#[stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
2045+
#[rustc_const_stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
20462046
#[must_use = "this returns the result of the operation, \
20472047
without modifying the original"]
20482048
#[inline]
@@ -2073,7 +2073,6 @@ macro_rules! int_impl {
20732073
/// Basic usage:
20742074
///
20752075
/// ```
2076-
/// #![feature(int_roundings)]
20772076
#[doc = concat!("let a: ", stringify!($SelfT)," = 8;")]
20782077
/// let b = 3;
20792078
///
@@ -2082,7 +2081,8 @@ macro_rules! int_impl {
20822081
/// assert_eq!((-a).div_ceil(b), -2);
20832082
/// assert_eq!((-a).div_ceil(-b), 3);
20842083
/// ```
2085-
#[unstable(feature = "int_roundings", issue = "88581")]
2084+
#[stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
2085+
#[rustc_const_stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
20862086
#[must_use = "this returns the result of the operation, \
20872087
without modifying the original"]
20882088
#[inline]
@@ -2116,7 +2116,6 @@ macro_rules! int_impl {
21162116
/// Basic usage:
21172117
///
21182118
/// ```
2119-
/// #![feature(int_roundings)]
21202119
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".next_multiple_of(8), 16);")]
21212120
#[doc = concat!("assert_eq!(23_", stringify!($SelfT), ".next_multiple_of(8), 24);")]
21222121
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".next_multiple_of(-8), 16);")]
@@ -2126,7 +2125,8 @@ macro_rules! int_impl {
21262125
#[doc = concat!("assert_eq!((-16_", stringify!($SelfT), ").next_multiple_of(-8), -16);")]
21272126
#[doc = concat!("assert_eq!((-23_", stringify!($SelfT), ").next_multiple_of(-8), -24);")]
21282127
/// ```
2129-
#[unstable(feature = "int_roundings", issue = "88581")]
2128+
#[stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
2129+
#[rustc_const_stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
21302130
#[must_use = "this returns the result of the operation, \
21312131
without modifying the original"]
21322132
#[inline]
@@ -2162,7 +2162,6 @@ macro_rules! int_impl {
21622162
/// Basic usage:
21632163
///
21642164
/// ```
2165-
/// #![feature(int_roundings)]
21662165
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(16));")]
21672166
#[doc = concat!("assert_eq!(23_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(24));")]
21682167
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".checked_next_multiple_of(-8), Some(16));")]
@@ -2174,7 +2173,8 @@ macro_rules! int_impl {
21742173
#[doc = concat!("assert_eq!(1_", stringify!($SelfT), ".checked_next_multiple_of(0), None);")]
21752174
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.checked_next_multiple_of(2), None);")]
21762175
/// ```
2177-
#[unstable(feature = "int_roundings", issue = "88581")]
2176+
#[stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
2177+
#[rustc_const_stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
21782178
#[must_use = "this returns the result of the operation, \
21792179
without modifying the original"]
21802180
#[inline]

library/core/src/num/uint_macros.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -2033,10 +2033,10 @@ macro_rules! uint_impl {
20332033
/// Basic usage:
20342034
///
20352035
/// ```
2036-
/// #![feature(int_roundings)]
20372036
#[doc = concat!("assert_eq!(7_", stringify!($SelfT), ".div_floor(4), 1);")]
20382037
/// ```
2039-
#[unstable(feature = "int_roundings", issue = "88581")]
2038+
#[stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
2039+
#[rustc_const_stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
20402040
#[must_use = "this returns the result of the operation, \
20412041
without modifying the original"]
20422042
#[inline(always)]
@@ -2060,10 +2060,10 @@ macro_rules! uint_impl {
20602060
/// Basic usage:
20612061
///
20622062
/// ```
2063-
/// #![feature(int_roundings)]
20642063
#[doc = concat!("assert_eq!(7_", stringify!($SelfT), ".div_ceil(4), 2);")]
20652064
/// ```
2066-
#[unstable(feature = "int_roundings", issue = "88581")]
2065+
#[stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
2066+
#[rustc_const_stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
20672067
#[must_use = "this returns the result of the operation, \
20682068
without modifying the original"]
20692069
#[inline]
@@ -2095,11 +2095,11 @@ macro_rules! uint_impl {
20952095
/// Basic usage:
20962096
///
20972097
/// ```
2098-
/// #![feature(int_roundings)]
20992098
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".next_multiple_of(8), 16);")]
21002099
#[doc = concat!("assert_eq!(23_", stringify!($SelfT), ".next_multiple_of(8), 24);")]
21012100
/// ```
2102-
#[unstable(feature = "int_roundings", issue = "88581")]
2101+
#[stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
2102+
#[rustc_const_stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
21032103
#[must_use = "this returns the result of the operation, \
21042104
without modifying the original"]
21052105
#[inline]
@@ -2120,13 +2120,13 @@ macro_rules! uint_impl {
21202120
/// Basic usage:
21212121
///
21222122
/// ```
2123-
/// #![feature(int_roundings)]
21242123
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(16));")]
21252124
#[doc = concat!("assert_eq!(23_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(24));")]
21262125
#[doc = concat!("assert_eq!(1_", stringify!($SelfT), ".checked_next_multiple_of(0), None);")]
21272126
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.checked_next_multiple_of(2), None);")]
21282127
/// ```
2129-
#[unstable(feature = "int_roundings", issue = "88581")]
2128+
#[stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
2129+
#[rustc_const_stable(feature = "int_roundings", since = "CURRENT_RUSTC_VERSION")]
21302130
#[must_use = "this returns the result of the operation, \
21312131
without modifying the original"]
21322132
#[inline]

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
#![feature(const_option_ext)]
8686
#![feature(const_result)]
8787
#![feature(integer_atomics)]
88-
#![feature(int_roundings)]
8988
#![feature(slice_group_by)]
9089
#![feature(split_array)]
9190
#![feature(strict_provenance)]

0 commit comments

Comments
 (0)