Skip to content

Commit 4e136a0

Browse files
committed
indirect-const-stabilize the exact_div intrinsic
1 parent df8d99a commit 4e136a0

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

Diff for: core/src/intrinsics/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2735,6 +2735,7 @@ pub const fn carrying_mul_add<T: ~const fallback::CarryingMulAdd<Unsigned = U>,
27352735
/// `x % y != 0` or `y == 0` or `x == T::MIN && y == -1`
27362736
///
27372737
/// This intrinsic does not have a stable counterpart.
2738+
#[rustc_intrinsic_const_stable_indirect]
27382739
#[rustc_nounwind]
27392740
#[rustc_intrinsic]
27402741
pub const unsafe fn exact_div<T: Copy>(x: T, y: T) -> T;

Diff for: core/src/slice/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,6 @@ impl<T> [T] {
12871287
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
12881288
/// ```
12891289
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1290-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
12911290
#[inline]
12921291
#[must_use]
12931292
pub const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]] {
@@ -1333,7 +1332,6 @@ impl<T> [T] {
13331332
/// assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
13341333
/// ```
13351334
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1336-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
13371335
#[inline]
13381336
#[track_caller]
13391337
#[must_use]
@@ -1368,7 +1366,6 @@ impl<T> [T] {
13681366
/// assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
13691367
/// ```
13701368
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1371-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
13721369
#[inline]
13731370
#[track_caller]
13741371
#[must_use]
@@ -1448,7 +1445,6 @@ impl<T> [T] {
14481445
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
14491446
/// ```
14501447
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1451-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
14521448
#[inline]
14531449
#[must_use]
14541450
pub const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]] {
@@ -1489,7 +1485,6 @@ impl<T> [T] {
14891485
/// assert_eq!(v, &[1, 1, 2, 2, 9]);
14901486
/// ```
14911487
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1492-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
14931488
#[inline]
14941489
#[track_caller]
14951490
#[must_use]
@@ -1530,7 +1525,6 @@ impl<T> [T] {
15301525
/// assert_eq!(v, &[9, 1, 1, 2, 2]);
15311526
/// ```
15321527
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1533-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
15341528
#[inline]
15351529
#[track_caller]
15361530
#[must_use]

0 commit comments

Comments
 (0)