about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2020-11-22 13:25:19 +0000
committervarkor <github@varkor.com>2020-11-22 13:45:14 +0000
commitcf32afcf4832bb407b4201ce747ac2e1185560e6 (patch)
treeab7f0666fbe3e968ca8e2d5f331b7d2fedc31489
parent20328b532336017213ccb4095740955d81060ebc (diff)
downloadrust-cf32afcf4832bb407b4201ce747ac2e1185560e6.tar.gz
rust-cf32afcf4832bb407b4201ce747ac2e1185560e6.zip
Stabilise `then`
-rw-r--r--compiler/rustc_index/src/lib.rs1
-rw-r--r--compiler/rustc_metadata/src/lib.rs1
-rw-r--r--compiler/rustc_parse/src/lib.rs1
-rw-r--r--library/core/src/bool.rs4
-rw-r--r--library/std/src/lib.rs1
-rw-r--r--library/test/src/lib.rs1
6 files changed, 1 insertions, 8 deletions
diff --git a/compiler/rustc_index/src/lib.rs b/compiler/rustc_index/src/lib.rs
index 7ee881b0639..eaef4c7b54a 100644
--- a/compiler/rustc_index/src/lib.rs
+++ b/compiler/rustc_index/src/lib.rs
@@ -1,5 +1,4 @@
 #![feature(allow_internal_unstable)]
-#![feature(bool_to_option)]
 #![feature(const_fn)]
 #![feature(const_panic)]
 #![feature(extend_one)]
diff --git a/compiler/rustc_metadata/src/lib.rs b/compiler/rustc_metadata/src/lib.rs
index 77766be7397..2560cfa7462 100644
--- a/compiler/rustc_metadata/src/lib.rs
+++ b/compiler/rustc_metadata/src/lib.rs
@@ -1,5 +1,4 @@
 #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
-#![feature(bool_to_option)]
 #![feature(core_intrinsics)]
 #![feature(crate_visibility_modifier)]
 #![feature(drain_filter)]
diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs
index f125a12147a..8a6b0230023 100644
--- a/compiler/rustc_parse/src/lib.rs
+++ b/compiler/rustc_parse/src/lib.rs
@@ -1,6 +1,5 @@
 //! The main parser interface.
 
-#![feature(bool_to_option)]
 #![feature(crate_visibility_modifier)]
 #![feature(bindings_after_at)]
 #![feature(iter_order_by)]
diff --git a/library/core/src/bool.rs b/library/core/src/bool.rs
index 6e0865e8653..00164c631b3 100644
--- a/library/core/src/bool.rs
+++ b/library/core/src/bool.rs
@@ -23,12 +23,10 @@ impl bool {
     /// # Examples
     ///
     /// ```
-    /// #![feature(bool_to_option)]
-    ///
     /// assert_eq!(false.then(|| 0), None);
     /// assert_eq!(true.then(|| 0), Some(0));
     /// ```
-    #[unstable(feature = "bool_to_option", issue = "64260")]
+    #[stable(feature = "lazy_bool_to_option", since = "1.50.0")]
     #[inline]
     pub fn then<T, F: FnOnce() -> T>(self, f: F) -> Option<T> {
         if self { Some(f()) } else { None }
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index db523f05e01..f1205ca2f1d 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -227,7 +227,6 @@
 #![feature(asm)]
 #![feature(associated_type_bounds)]
 #![feature(atomic_mut_ptr)]
-#![feature(bool_to_option)]
 #![feature(box_syntax)]
 #![feature(c_variadic)]
 #![feature(cfg_accessible)]
diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs
index 816b4d51188..f4c07655bc4 100644
--- a/library/test/src/lib.rs
+++ b/library/test/src/lib.rs
@@ -23,7 +23,6 @@
 #![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))]
 #![feature(rustc_private)]
 #![feature(nll)]
-#![feature(bool_to_option)]
 #![feature(available_concurrency)]
 #![feature(internal_output_capture)]
 #![feature(panic_unwind)]