diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:25 +0000 |
commit | 5363f350887b1e5b5dd21a86f88c8af9d7fea6da (patch) | |
tree | 35ca005eb6e0e9a1ba3bb5dbc033209ad445dc17 /library/core/src/num/nonzero.rs | |
parent | Adding debian version 1.66.0+dfsg1-1. (diff) | |
download | rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.tar.xz rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.zip |
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/core/src/num/nonzero.rs')
-rw-r--r-- | library/core/src/num/nonzero.rs | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 6b6f3417f..fbda8f82b 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -321,7 +321,6 @@ macro_rules! nonzero_unsigned_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let one = ", stringify!($Ty), "::new(1)?;")] @@ -356,7 +355,6 @@ macro_rules! nonzero_unsigned_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let one = ", stringify!($Ty), "::new(1)?;")] @@ -391,8 +389,8 @@ macro_rules! nonzero_unsigned_operations { /// /// ``` /// #![feature(nonzero_ops)] - #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// + #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let one = ", stringify!($Ty), "::new(1)?;")] @@ -420,7 +418,6 @@ macro_rules! nonzero_unsigned_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let two = ", stringify!($Ty), "::new(2)?;")] @@ -460,14 +457,13 @@ macro_rules! nonzero_unsigned_operations { /// # Examples /// /// ``` - /// #![feature(int_log)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// #[doc = concat!("assert_eq!(", stringify!($Ty), "::new(7).unwrap().ilog2(), 2);")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::new(8).unwrap().ilog2(), 3);")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::new(9).unwrap().ilog2(), 3);")] /// ``` - #[unstable(feature = "int_log", issue = "70887")] + #[stable(feature = "int_log", since = "1.67.0")] + #[rustc_const_stable(feature = "int_log", since = "1.67.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -485,14 +481,13 @@ macro_rules! nonzero_unsigned_operations { /// # Examples /// /// ``` - /// #![feature(int_log)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// #[doc = concat!("assert_eq!(", stringify!($Ty), "::new(99).unwrap().ilog10(), 1);")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::new(100).unwrap().ilog10(), 2);")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::new(101).unwrap().ilog10(), 2);")] /// ``` - #[unstable(feature = "int_log", issue = "70887")] + #[stable(feature = "int_log", since = "1.67.0")] + #[rustc_const_stable(feature = "int_log", since = "1.67.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -526,7 +521,6 @@ macro_rules! nonzero_signed_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let pos = ", stringify!($Ty), "::new(1)?;")] @@ -556,7 +550,6 @@ macro_rules! nonzero_signed_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let pos = ", stringify!($Ty), "::new(1)?;")] @@ -591,7 +584,6 @@ macro_rules! nonzero_signed_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let pos = ", stringify!($Ty), "::new(1)?;")] @@ -626,7 +618,6 @@ macro_rules! nonzero_signed_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let pos = ", stringify!($Ty), "::new(1)?;")] @@ -662,14 +653,13 @@ macro_rules! nonzero_signed_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let pos = ", stringify!($Ty), "::new(1)?;")] #[doc = concat!("let neg = ", stringify!($Ty), "::new(-1)?;")] #[doc = concat!("let min = ", stringify!($Ty), "::new(", stringify!($Int), "::MIN)?;")] - #[doc = concat!("let max = ", stringify!($Ty), "::new(", + #[doc = concat!("# let max = ", stringify!($Ty), "::new(", stringify!($Int), "::MAX)?;")] /// /// assert_eq!(pos, pos.wrapping_abs()); @@ -905,7 +895,6 @@ macro_rules! nonzero_unsigned_signed_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let two = ", stringify!($Ty), "::new(2)?;")] @@ -941,7 +930,6 @@ macro_rules! nonzero_unsigned_signed_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let two = ", stringify!($Ty), "::new(2)?;")] @@ -986,8 +974,8 @@ macro_rules! nonzero_unsigned_signed_operations { /// /// ``` /// #![feature(nonzero_ops)] - #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// + #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let two = ", stringify!($Ty), "::new(2)?;")] @@ -1014,7 +1002,6 @@ macro_rules! nonzero_unsigned_signed_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let three = ", stringify!($Ty), "::new(3)?;")] @@ -1058,7 +1045,6 @@ macro_rules! nonzero_unsigned_signed_operations { /// /// ``` #[doc = concat!("# use std::num::", stringify!($Ty), ";")] - /// /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { #[doc = concat!("let three = ", stringify!($Ty), "::new(3)?;")] @@ -1162,8 +1148,8 @@ macro_rules! nonzero_min_max_unsigned { /// /// ``` /// #![feature(nonzero_min_max)] - #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// + #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), 1", stringify!($Int), ");")] /// ``` #[unstable(feature = "nonzero_min_max", issue = "89065")] @@ -1177,8 +1163,8 @@ macro_rules! nonzero_min_max_unsigned { /// /// ``` /// #![feature(nonzero_min_max)] - #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// + #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")] /// ``` #[unstable(feature = "nonzero_min_max", issue = "89065")] @@ -1204,8 +1190,8 @@ macro_rules! nonzero_min_max_signed { /// /// ``` /// #![feature(nonzero_min_max)] - #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// + #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), ", stringify!($Int), "::MIN);")] /// ``` #[unstable(feature = "nonzero_min_max", issue = "89065")] @@ -1223,8 +1209,8 @@ macro_rules! nonzero_min_max_signed { /// /// ``` /// #![feature(nonzero_min_max)] - #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// + #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")] /// ``` #[unstable(feature = "nonzero_min_max", issue = "89065")] @@ -1263,12 +1249,11 @@ macro_rules! nonzero_bits { /// # Examples /// /// ``` - /// #![feature(nonzero_bits)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// #[doc = concat!("assert_eq!(", stringify!($Ty), "::BITS, ", stringify!($Int), "::BITS);")] /// ``` - #[unstable(feature = "nonzero_bits", issue = "94881")] + #[stable(feature = "nonzero_bits", since = "1.67.0")] pub const BITS: u32 = <$Int>::BITS; } )+ |