mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 13:36:49 +00:00
Rollup merge of #139163 - scottmcm:stabilize-exact_div, r=RalfJung
indirect-const-stabilize the `exact_div` intrinsic See https://github.com/rust-lang/rust/issues/74985#issuecomment-2759179184
This commit is contained in:
commit
2722e82653
@ -2737,6 +2737,7 @@ pub const fn carrying_mul_add<T: ~const fallback::CarryingMulAdd<Unsigned = U>,
|
||||
/// `x % y != 0` or `y == 0` or `x == T::MIN && y == -1`
|
||||
///
|
||||
/// This intrinsic does not have a stable counterpart.
|
||||
#[rustc_intrinsic_const_stable_indirect]
|
||||
#[rustc_nounwind]
|
||||
#[rustc_intrinsic]
|
||||
pub const unsafe fn exact_div<T: Copy>(x: T, y: T) -> T;
|
||||
|
@ -1287,7 +1287,6 @@ impl<T> [T] {
|
||||
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
|
||||
/// ```
|
||||
#[unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]] {
|
||||
@ -1333,7 +1332,6 @@ impl<T> [T] {
|
||||
/// assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
|
||||
/// ```
|
||||
#[unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
#[must_use]
|
||||
@ -1368,7 +1366,6 @@ impl<T> [T] {
|
||||
/// assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
|
||||
/// ```
|
||||
#[unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
#[must_use]
|
||||
@ -1448,7 +1445,6 @@ impl<T> [T] {
|
||||
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
|
||||
/// ```
|
||||
#[unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]] {
|
||||
@ -1489,7 +1485,6 @@ impl<T> [T] {
|
||||
/// assert_eq!(v, &[1, 1, 2, 2, 9]);
|
||||
/// ```
|
||||
#[unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
#[must_use]
|
||||
@ -1530,7 +1525,6 @@ impl<T> [T] {
|
||||
/// assert_eq!(v, &[9, 1, 1, 2, 2]);
|
||||
/// ```
|
||||
#[unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[rustc_const_unstable(feature = "slice_as_chunks", issue = "74985")]
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
#[must_use]
|
||||
|
Loading…
Reference in New Issue
Block a user