Skip to content

Commit 9aea966

Browse files
authored
Rollup merge of #94455 - jhpratt:stabilize-int_roundings, r=joshtriplett
Partially stabilize `int_roundings` This stabilizes the following: ```rust impl uX { pub const fn div_ceil(self, rhs: Self) -> Self; pub const fn next_multiple_of(self, rhs: Self) -> Self; pub const fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>; } ``` This feature is tracked in #88581.
2 parents b08dd92 + 62ca5aa commit 9aea966

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

compiler/rustc_codegen_ssa/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![feature(associated_type_bounds)]
33
#![feature(box_patterns)]
44
#![feature(if_let_guard)]
5-
#![feature(int_roundings)]
65
#![feature(let_chains)]
76
#![feature(negative_impls)]
87
#![feature(never_type)]

library/core/src/num/uint_macros.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -2074,10 +2074,10 @@ macro_rules! uint_impl {
20742074
/// Basic usage:
20752075
///
20762076
/// ```
2077-
/// #![feature(int_roundings)]
20782077
#[doc = concat!("assert_eq!(7_", stringify!($SelfT), ".div_ceil(4), 2);")]
20792078
/// ```
2080-
#[unstable(feature = "int_roundings", issue = "88581")]
2079+
#[stable(feature = "int_roundings1", since = "CURRENT_RUSTC_VERSION")]
2080+
#[rustc_const_stable(feature = "int_roundings1", since = "CURRENT_RUSTC_VERSION")]
20812081
#[must_use = "this returns the result of the operation, \
20822082
without modifying the original"]
20832083
#[inline]
@@ -2109,11 +2109,11 @@ macro_rules! uint_impl {
21092109
/// Basic usage:
21102110
///
21112111
/// ```
2112-
/// #![feature(int_roundings)]
21132112
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".next_multiple_of(8), 16);")]
21142113
#[doc = concat!("assert_eq!(23_", stringify!($SelfT), ".next_multiple_of(8), 24);")]
21152114
/// ```
2116-
#[unstable(feature = "int_roundings", issue = "88581")]
2115+
#[stable(feature = "int_roundings1", since = "CURRENT_RUSTC_VERSION")]
2116+
#[rustc_const_stable(feature = "int_roundings1", since = "CURRENT_RUSTC_VERSION")]
21172117
#[must_use = "this returns the result of the operation, \
21182118
without modifying the original"]
21192119
#[inline]
@@ -2134,13 +2134,13 @@ macro_rules! uint_impl {
21342134
/// Basic usage:
21352135
///
21362136
/// ```
2137-
/// #![feature(int_roundings)]
21382137
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(16));")]
21392138
#[doc = concat!("assert_eq!(23_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(24));")]
21402139
#[doc = concat!("assert_eq!(1_", stringify!($SelfT), ".checked_next_multiple_of(0), None);")]
21412140
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.checked_next_multiple_of(2), None);")]
21422141
/// ```
2143-
#[unstable(feature = "int_roundings", issue = "88581")]
2142+
#[stable(feature = "int_roundings1", since = "CURRENT_RUSTC_VERSION")]
2143+
#[rustc_const_stable(feature = "int_roundings1", since = "CURRENT_RUSTC_VERSION")]
21442144
#[must_use = "this returns the result of the operation, \
21452145
without modifying the original"]
21462146
#[inline]

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@
293293
#![feature(float_next_up_down)]
294294
#![feature(hasher_prefixfree_extras)]
295295
#![feature(hashmap_internals)]
296-
#![feature(int_roundings)]
297296
#![feature(ip)]
298297
#![feature(ip_in_core)]
299298
#![feature(maybe_uninit_slice)]

0 commit comments

Comments
 (0)