diff options
| author | Alex Burka <alex@alexburka.com> | 2017-09-08 18:26:54 +0000 |
|---|---|---|
| committer | Alex Burka <alex@alexburka.com> | 2017-09-16 15:53:02 +0000 |
| commit | 681e5da61ee3f1251c00c2ec0d93dd23dbf861bc (patch) | |
| tree | a6e75c81f714d9869123ffe5b3c34fbfc05fae61 /src/libcore/num | |
| parent | a12d0d4f6672a9621771433d2f05757f1f79130d (diff) | |
| download | rust-681e5da61ee3f1251c00c2ec0d93dd23dbf861bc.tar.gz rust-681e5da61ee3f1251c00c2ec0d93dd23dbf861bc.zip | |
change #![feature(const_fn)] to specific gates
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index c5175287ccf..bf31deae7a6 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -109,6 +109,7 @@ macro_rules! int_impl { /// assert_eq!(i8::min_value(), -128); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_min_value"))] #[inline] pub const fn min_value() -> Self { !0 ^ ((!0 as $UnsignedT) >> 1) as Self @@ -122,6 +123,7 @@ macro_rules! int_impl { /// assert_eq!(i8::max_value(), 127); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_max_value"))] #[inline] pub const fn max_value() -> Self { !Self::min_value() @@ -1280,6 +1282,7 @@ macro_rules! uint_impl { /// assert_eq!(u8::min_value(), 0); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_min_value"))] #[inline] pub const fn min_value() -> Self { 0 } @@ -1291,6 +1294,7 @@ macro_rules! uint_impl { /// assert_eq!(u8::max_value(), 255); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_max_value"))] #[inline] pub const fn max_value() -> Self { !0 } |
