aboutsummaryrefslogtreecommitdiff
path: root/libcore/num/uint_macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libcore/num/uint_macros.rs')
-rw-r--r--libcore/num/uint_macros.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcore/num/uint_macros.rs b/libcore/num/uint_macros.rs
index 6479836..2ab2f95 100644
--- a/libcore/num/uint_macros.rs
+++ b/libcore/num/uint_macros.rs
@@ -10,13 +10,13 @@
#![doc(hidden)]
-macro_rules! uint_module { ($T:ty, $bits:expr) => (
+macro_rules! uint_module { ($T:ident, $bits:expr) => (
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(missing_docs)]
-pub const MIN: $T = 0 as $T;
+pub const MIN: $T = $T::min_value();
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(missing_docs)]
-pub const MAX: $T = !0 as $T;
+pub const MAX: $T = $T::max_value();
) }