Remove uint_macros that was identical to int_macros
This commit is contained in:
@@ -155,10 +155,6 @@ mod internal_macros;
|
||||
#[macro_use]
|
||||
mod int_macros;
|
||||
|
||||
#[path = "num/uint_macros.rs"]
|
||||
#[macro_use]
|
||||
mod uint_macros;
|
||||
|
||||
#[path = "num/i128.rs"]
|
||||
pub mod i128;
|
||||
#[path = "num/i16.rs"]
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
#![doc(hidden)]
|
||||
|
||||
macro_rules! doc_comment {
|
||||
($x:expr, $($tt:tt)*) => {
|
||||
#[doc = $x]
|
||||
$($tt)*
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! int_module {
|
||||
($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
|
||||
($T:ident, #[$attr:meta]) => (
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
//! *[See also the `u128` primitive type](../../std/primitive.u128.html).*
|
||||
|
||||
#![stable(feature = "i128", since = "1.26.0")]
|
||||
uint_module! { u128, #[stable(feature = "i128", since="1.26.0")] }
|
||||
int_module! { u128, #[stable(feature = "i128", since="1.26.0")] }
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
uint_module! { u16 }
|
||||
int_module! { u16 }
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
uint_module! { u32 }
|
||||
int_module! { u32 }
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
uint_module! { u64 }
|
||||
int_module! { u64 }
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
uint_module! { u8 }
|
||||
int_module! { u8 }
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
#![doc(hidden)]
|
||||
|
||||
macro_rules! doc_comment {
|
||||
($x:expr, $($tt:tt)*) => {
|
||||
#[doc = $x]
|
||||
$($tt)*
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! uint_module {
|
||||
($T:ident) => (uint_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
|
||||
($T:ident, #[$attr:meta]) => (
|
||||
doc_comment! {
|
||||
concat!("**This method is soft-deprecated.**
|
||||
|
||||
Although using it won’t cause compilation warning,
|
||||
new code should use [`", stringify!($T), "::MIN", "`] instead.
|
||||
|
||||
The smallest value that can be represented by this integer type."),
|
||||
#[$attr]
|
||||
pub const MIN: $T = $T::min_value();
|
||||
}
|
||||
|
||||
doc_comment! {
|
||||
concat!("**This method is soft-deprecated.**
|
||||
|
||||
Although using it won’t cause compilation warning,
|
||||
new code should use [`", stringify!($T), "::MAX", "`] instead.
|
||||
|
||||
The largest value that can be represented by this integer type."),
|
||||
#[$attr]
|
||||
pub const MAX: $T = $T::max_value();
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
uint_module! { usize }
|
||||
int_module! { usize }
|
||||
|
||||
Reference in New Issue
Block a user