From 49e39efc698c78e0d220b2d24bcd26d9790d4baf Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Thu, 4 Apr 2024 21:18:24 -0500 Subject: [PATCH] Revert "Put basic impls for f16 and f128 behind cfg(not(bootstrap))" This reverts commit 049a91753594422b6c672bf5a46e04076fc45d9e. The resolution to is that the `f16`/`f128` regression in the beta compiler was fixable without a revert, so the commit adding `#[cfg(not(bootstrap))]` is no longer useful (added in ). Revert this commit because not having these basic impls bootstrap-gated simplifies everything else that uses them. --- library/core/src/clone.rs | 5 +---- library/core/src/cmp.rs | 10 ++-------- library/core/src/lib.rs | 4 ++-- library/core/src/marker.rs | 8 +------- 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/library/core/src/clone.rs b/library/core/src/clone.rs index 44ae72bcd26bf..d448c5338fc46 100644 --- a/library/core/src/clone.rs +++ b/library/core/src/clone.rs @@ -227,13 +227,10 @@ mod impls { impl_clone! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 - f32 f64 + f16 f32 f64 f128 bool char } - #[cfg(not(bootstrap))] - impl_clone! { f16 f128 } - #[unstable(feature = "never_type", issue = "35121")] impl Clone for ! { #[inline] diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index 81bba927554a4..fa218600ed925 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -1497,12 +1497,9 @@ mod impls { } partial_eq_impl! { - bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 + bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f16 f32 f64 f128 } - #[cfg(not(bootstrap))] - partial_eq_impl! { f16 f128 } - macro_rules! eq_impl { ($($t:ty)*) => ($( #[stable(feature = "rust1", since = "1.0.0")] @@ -1553,10 +1550,7 @@ mod impls { } } - partial_ord_impl! { f32 f64 } - - #[cfg(not(bootstrap))] - partial_ord_impl! { f16 f128 } + partial_ord_impl! { f16 f32 f64 f128 } macro_rules! ord_impl { ($($t:ty)*) => ($( diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 1e52d7ac41244..42992fcf69ab7 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -200,8 +200,6 @@ // // Language features: // tidy-alphabetical-start -#![cfg_attr(not(bootstrap), feature(f128))] -#![cfg_attr(not(bootstrap), feature(f16))] #![feature(abi_unadjusted)] #![feature(adt_const_params)] #![feature(allow_internal_unsafe)] @@ -226,6 +224,8 @@ #![feature(doc_notable_trait)] #![feature(effects)] #![feature(extern_types)] +#![feature(f128)] +#![feature(f16)] #![feature(freeze_impls)] #![feature(fundamental)] #![feature(generic_arg_infer)] diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index fb97b3bfa0926..1d073a6d649b8 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -422,17 +422,11 @@ marker_impls! { Copy for usize, u8, u16, u32, u64, u128, isize, i8, i16, i32, i64, i128, - f32, f64, + f16, f32, f64, f128, bool, char, {T: ?Sized} *const T, {T: ?Sized} *mut T, -} -#[cfg(not(bootstrap))] -marker_impls! { - #[stable(feature = "rust1", since = "1.0.0")] - Copy for - f16, f128, } #[unstable(feature = "never_type", issue = "35121")]