aboutsummaryrefslogtreecommitdiff
path: root/libcore/num/uint_macros.rs
diff options
context:
space:
mode:
authorpravic <[email protected]>2016-06-06 23:07:53 +0300
committerpravic <[email protected]>2016-06-06 23:07:53 +0300
commitf2db0929feeb53567655dbdebba7e6b1c3f2f69e (patch)
treec2cf041f838782f9ddd8994146f52e8f498bfe07 /libcore/num/uint_macros.rs
parentadd 'netio' native import library (diff)
parentMerge branch 'nofp_patch' into libcore_nofp (diff)
downloadkmd-env-rs-master.tar.xz
kmd-env-rs-master.zip
Merge branch 'libcore_nofp'HEADmaster
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();
) }