diff options
| author | bors <bors@rust-lang.org> | 2022-04-07 07:34:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-07 07:34:04 +0000 |
| commit | f565016eddc3cb812e647d54b06cfe74bdee2900 (patch) | |
| tree | 2ff05c1dacc33d2a51c0c80b3551301275a6e308 /library/core/src/bool.rs | |
| parent | 8cd6080f6c778f6664ea3d12ca7848231707a627 (diff) | |
| parent | b500a78ac1dc70bef53ead56f5a1671bb9fd3d4c (diff) | |
| download | rust-f565016eddc3cb812e647d54b06cfe74bdee2900.tar.gz rust-f565016eddc3cb812e647d54b06cfe74bdee2900.zip | |
Auto merge of #95678 - pietroalbini:pa-1.62.0-bootstrap, r=Mark-Simulacrum
Bump bootstrap compiler to 1.61.0 beta This PR bumps the bootstrap compiler to the 1.61.0 beta. The first commit changes the stage0 compiler, the second commit applies the "mechanical" changes and the third and fourth commits apply changes explained in the relevant comments. r? `@Mark-Simulacrum`
Diffstat (limited to 'library/core/src/bool.rs')
| -rw-r--r-- | library/core/src/bool.rs | 7 |
1 files changed, 2 insertions, 5 deletions
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<T>(self, t: T) -> Option<T> 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<T, F>(self, f: F) -> Option<T> where F: ~const FnOnce() -> T, - F: ~const Drop + ~const Destruct, + F: ~const Destruct, { if self { Some(f()) } else { None } } |
