summaryrefslogtreecommitdiffstats
path: root/library/core/src/num
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /library/core/src/num
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/core/src/num')
-rw-r--r--library/core/src/num/int_macros.rs1
-rw-r--r--library/core/src/num/uint_macros.rs13
2 files changed, 8 insertions, 6 deletions
diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs
index 1199d09b5..1f43520e1 100644
--- a/library/core/src/num/int_macros.rs
+++ b/library/core/src/num/int_macros.rs
@@ -2126,6 +2126,7 @@ macro_rules! int_impl {
/// assert_eq!(a.rem_euclid(-b), 3);
/// assert_eq!((-a).rem_euclid(-b), 1);
/// ```
+ #[doc(alias = "modulo", alias = "mod")]
#[stable(feature = "euclidean_division", since = "1.38.0")]
#[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs
index 6f6b6dbb8..23ca37817 100644
--- a/library/core/src/num/uint_macros.rs
+++ b/library/core/src/num/uint_macros.rs
@@ -2024,6 +2024,7 @@ macro_rules! uint_impl {
/// ```
#[doc = concat!("assert_eq!(7", stringify!($SelfT), ".rem_euclid(4), 3); // or any other integer type")]
/// ```
+ #[doc(alias = "modulo", alias = "mod")]
#[stable(feature = "euclidean_division", since = "1.38.0")]
#[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
@@ -2074,10 +2075,10 @@ macro_rules! uint_impl {
/// Basic usage:
///
/// ```
- /// #![feature(int_roundings)]
#[doc = concat!("assert_eq!(7_", stringify!($SelfT), ".div_ceil(4), 2);")]
/// ```
- #[unstable(feature = "int_roundings", issue = "88581")]
+ #[stable(feature = "int_roundings1", since = "1.73.0")]
+ #[rustc_const_stable(feature = "int_roundings1", since = "1.73.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@@ -2109,11 +2110,11 @@ macro_rules! uint_impl {
/// Basic usage:
///
/// ```
- /// #![feature(int_roundings)]
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".next_multiple_of(8), 16);")]
#[doc = concat!("assert_eq!(23_", stringify!($SelfT), ".next_multiple_of(8), 24);")]
/// ```
- #[unstable(feature = "int_roundings", issue = "88581")]
+ #[stable(feature = "int_roundings1", since = "1.73.0")]
+ #[rustc_const_stable(feature = "int_roundings1", since = "1.73.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@@ -2134,13 +2135,13 @@ macro_rules! uint_impl {
/// Basic usage:
///
/// ```
- /// #![feature(int_roundings)]
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(16));")]
#[doc = concat!("assert_eq!(23_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(24));")]
#[doc = concat!("assert_eq!(1_", stringify!($SelfT), ".checked_next_multiple_of(0), None);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.checked_next_multiple_of(2), None);")]
/// ```
- #[unstable(feature = "int_roundings", issue = "88581")]
+ #[stable(feature = "int_roundings1", since = "1.73.0")]
+ #[rustc_const_stable(feature = "int_roundings1", since = "1.73.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]