about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2020-05-21 12:18:32 -0700
committerDylan MacKenzie <ecstaticmorse@gmail.com>2020-06-28 10:08:09 -0700
commit48ebd2cdb8f9a9010a345349304edaa757d3e4cc (patch)
tree5b93b0a1b6cc7d1b909378fb4e0245916b2aecfe /src/libcore
parentf33a75c20ced68f5f9b384ab213ced26a1276107 (diff)
downloadrust-48ebd2cdb8f9a9010a345349304edaa757d3e4cc.tar.gz
rust-48ebd2cdb8f9a9010a345349304edaa757d3e4cc.zip
Remove `const_if_match` feature gate from libraries
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/lib.rs2
-rw-r--r--src/libcore/num/mod.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 2b26e5303a8..1391dc7a953 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -73,7 +73,7 @@
 #![feature(const_ascii_ctype_on_intrinsics)]
 #![feature(const_alloc_layout)]
 #![feature(const_discriminant)]
-#![feature(const_if_match)]
+#![cfg_attr(bootstrap, feature(const_if_match))]
 #![feature(const_loop)]
 #![feature(const_checked_int_methods)]
 #![feature(const_euclidean_int_methods)]
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index b1317bc2121..1714d2ee98e 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -1578,7 +1578,7 @@ $EndFeature, "
             #[stable(feature = "no_panic_abs", since = "1.13.0")]
             #[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
             #[allow(unused_attributes)]
-            #[allow_internal_unstable(const_if_match)]
+            #[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
             #[inline]
             pub const fn wrapping_abs(self) -> Self {
                  if self.is_negative() {
@@ -1867,7 +1867,7 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_neg(), (", stringify!($Self
             #[stable(feature = "wrapping", since = "1.7.0")]
             #[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
             #[allow(unused_attributes)]
-            #[allow_internal_unstable(const_if_match)]
+            #[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
             pub const fn overflowing_neg(self) -> (Self, bool) {
                 if self == Self::MIN {
                     (Self::MIN, true)
@@ -2160,7 +2160,7 @@ $EndFeature, "
             #[stable(feature = "rust1", since = "1.0.0")]
             #[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
             #[allow(unused_attributes)]
-            #[allow_internal_unstable(const_if_match)]
+            #[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
             #[inline]
             #[rustc_inherit_overflow_checks]
             pub const fn abs(self) -> Self {