From 181d28bb6110dc974879db20d433f21aa142db3a Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 5 Apr 2022 22:42:23 +0200 Subject: trivial cfg(bootstrap) changes --- library/core/src/bool.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'library/core/src/bool.rs') diff --git a/library/core/src/bool.rs b/library/core/src/bool.rs index 06aee3ccbaf..36000f8f389 100644 --- a/library/core/src/bool.rs +++ b/library/core/src/bool.rs @@ -2,7 +2,6 @@ use crate::marker::Destruct; -#[cfg_attr(bootstrap, lang = "bool")] impl bool { /// Returns `Some(t)` if the `bool` is [`true`](../std/keyword.true.html), /// or `None` otherwise. @@ -18,10 +17,9 @@ impl bool { #[unstable(feature = "bool_to_option", issue = "80967")] #[rustc_const_unstable(feature = "const_bool_to_option", issue = "91917")] #[inline] - #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping pub const fn then_some(self, t: T) -> Option where - T: ~const Drop + ~const Destruct, + T: ~const Destruct, { if self { Some(t) } else { None } } @@ -38,11 +36,10 @@ impl bool { #[stable(feature = "lazy_bool_to_option", since = "1.50.0")] #[rustc_const_unstable(feature = "const_bool_to_option", issue = "91917")] #[inline] - #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping pub const fn then(self, f: F) -> Option where F: ~const FnOnce() -> T, - F: ~const Drop + ~const Destruct, + F: ~const Destruct, { if self { Some(f()) } else { None } } -- cgit 1.4.1-3-g733a5