mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-02 01:52:51 +00:00
Stabilize intrinsics as const
This commit is contained in:
parent
265e03332b
commit
f55029ab04
@ -1593,7 +1593,7 @@ extern "rust-intrinsic" {
|
||||
/// Safe wrappers for this intrinsic are available on the integer
|
||||
/// primitives via the `checked_div` method. For example,
|
||||
/// [`u32::checked_div`]
|
||||
#[rustc_const_unstable(feature = "const_int_unchecked_arith", issue = "none")]
|
||||
#[rustc_const_stable(feature = "const_int_unchecked_arith", since = "1.51.0")]
|
||||
pub fn unchecked_div<T: Copy>(x: T, y: T) -> T;
|
||||
/// Returns the remainder of an unchecked division, resulting in
|
||||
/// undefined behavior when `y == 0` or `x == T::MIN && y == -1`
|
||||
@ -1601,7 +1601,7 @@ extern "rust-intrinsic" {
|
||||
/// Safe wrappers for this intrinsic are available on the integer
|
||||
/// primitives via the `checked_rem` method. For example,
|
||||
/// [`u32::checked_rem`]
|
||||
#[rustc_const_unstable(feature = "const_int_unchecked_arith", issue = "none")]
|
||||
#[rustc_const_stable(feature = "const_int_unchecked_arith", since = "1.51.0")]
|
||||
pub fn unchecked_rem<T: Copy>(x: T, y: T) -> T;
|
||||
|
||||
/// Performs an unchecked left shift, resulting in undefined behavior when
|
||||
|
@ -514,7 +514,6 @@ macro_rules! int_impl {
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "const_checked_int_methods", since = "1.51.0")]
|
||||
#[rustc_allow_const_fn_unstable(const_int_unchecked_arith)]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
@ -567,7 +566,6 @@ macro_rules! int_impl {
|
||||
/// ```
|
||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||
#[rustc_const_stable(feature = "const_checked_int_methods", since = "1.51.0")]
|
||||
#[rustc_allow_const_fn_unstable(const_int_unchecked_arith)]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
|
@ -523,7 +523,6 @@ macro_rules! uint_impl {
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "const_checked_int_methods", since = "1.51.0")]
|
||||
#[rustc_allow_const_fn_unstable(const_int_unchecked_arith)]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
@ -575,7 +574,6 @@ macro_rules! uint_impl {
|
||||
/// ```
|
||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||
#[rustc_const_stable(feature = "const_checked_int_methods", since = "1.51.0")]
|
||||
#[rustc_allow_const_fn_unstable(const_int_unchecked_arith)]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
|
Loading…
Reference in New Issue
Block a user