about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLinus Färnstrand <faern@faern.net>2020-04-17 00:44:19 +0200
committerLinus Färnstrand <faern@faern.net>2020-04-20 23:38:06 +0200
commit4ddf66187aeca3ad1d44e239c794ecf4be95c5bf (patch)
treee43819e4de093a24e09107ab84210d248cbcf6ff /src
parent9fc083323503134a9af73516f22347ecc6650705 (diff)
downloadrust-4ddf66187aeca3ad1d44e239c794ecf4be95c5bf.tar.gz
rust-4ddf66187aeca3ad1d44e239c794ecf4be95c5bf.zip
Define module level int consts from assoc consts
Diffstat (limited to 'src')
-rw-r--r--src/libcore/num/int_macros.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/num/int_macros.rs b/src/libcore/num/int_macros.rs
index b68a09e1131..5035445ba93 100644
--- a/src/libcore/num/int_macros.rs
+++ b/src/libcore/num/int_macros.rs
@@ -14,14 +14,14 @@ macro_rules! int_module {
             concat!("The smallest value that can be represented by this integer type.
 Use [`", stringify!($T), "::MIN", "`](../../std/primitive.", stringify!($T), ".html#associatedconstant.MIN) instead."),
             #[$attr]
-            pub const MIN: $T = $T::min_value();
+            pub const MIN: $T = $T::MIN;
         }
 
         doc_comment! {
             concat!("The largest value that can be represented by this integer type.
 Use [`", stringify!($T), "::MAX", "`](../../std/primitive.", stringify!($T), ".html#associatedconstant.MAX) instead."),
             #[$attr]
-            pub const MAX: $T = $T::max_value();
+            pub const MAX: $T = $T::MAX;
         }
     )
 }