Skip to content

Commit 308d5ae

Browse files
committed
indirect-const-stabilize the exact_div intrinsic
1 parent ae8ab87 commit 308d5ae

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

library/core/src/intrinsics/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2786,6 +2786,7 @@ pub const fn carrying_mul_add<T: ~const fallback::CarryingMulAdd<Unsigned = U>,
27862786
/// `x % y != 0` or `y == 0` or `x == T::MIN && y == -1`
27872787
///
27882788
/// This intrinsic does not have a stable counterpart.
2789+
#[rustc_intrinsic_const_stable_indirect]
27892790
#[rustc_nounwind]
27902791
#[rustc_intrinsic]
27912792
pub const unsafe fn exact_div<T: Copy>(x: T, y: T) -> T;

library/core/src/slice/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,6 @@ impl<T> [T] {
13061306
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
13071307
/// ```
13081308
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1309-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
13101309
#[inline]
13111310
#[must_use]
13121311
pub const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]] {
@@ -1352,7 +1351,6 @@ impl<T> [T] {
13521351
/// assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
13531352
/// ```
13541353
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1355-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
13561354
#[inline]
13571355
#[track_caller]
13581356
#[must_use]
@@ -1387,7 +1385,6 @@ impl<T> [T] {
13871385
/// assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
13881386
/// ```
13891387
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1390-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
13911388
#[inline]
13921389
#[track_caller]
13931390
#[must_use]
@@ -1466,7 +1463,6 @@ impl<T> [T] {
14661463
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
14671464
/// ```
14681465
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1469-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
14701466
#[inline]
14711467
#[must_use]
14721468
pub const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]] {
@@ -1507,7 +1503,6 @@ impl<T> [T] {
15071503
/// assert_eq!(v, &[1, 1, 2, 2, 9]);
15081504
/// ```
15091505
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1510-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
15111506
#[inline]
15121507
#[track_caller]
15131508
#[must_use]
@@ -1548,7 +1543,6 @@ impl<T> [T] {
15481543
/// assert_eq!(v, &[9, 1, 1, 2, 2]);
15491544
/// ```
15501545
#[unstable(feature = "slice_as_chunks", issue = "74985")]
1551-
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
15521546
#[inline]
15531547
#[track_caller]
15541548
#[must_use]

0 commit comments

Comments
 (0)