Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put basic impls for f16 and f128 behind cfg(not(bootstrap)) #123390

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion library/core/src/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,13 @@ mod impls {
impl_clone! {
usize u8 u16 u32 u64 u128
isize i8 i16 i32 i64 i128
f16 f32 f64 f128
f32 f64
bool char
}

#[cfg(not(bootstrap))]
impl_clone! { f16 f128 }

#[unstable(feature = "never_type", issue = "35121")]
impl Clone for ! {
#[inline]
Expand Down
10 changes: 8 additions & 2 deletions library/core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1493,9 +1493,12 @@ mod impls {
}

partial_eq_impl! {
bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f16 f32 f64 f128
bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64
}

#[cfg(not(bootstrap))]
partial_eq_impl! { f16 f128 }

macro_rules! eq_impl {
($($t:ty)*) => ($(
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -1546,7 +1549,10 @@ mod impls {
}
}

partial_ord_impl! { f16 f32 f64 f128 }
partial_ord_impl! { f32 f64 }

#[cfg(not(bootstrap))]
partial_ord_impl! { f16 f128 }

macro_rules! ord_impl {
($($t:ty)*) => ($(
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@
//
// 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)]
Expand All @@ -229,8 +231,6 @@
#![feature(doc_notable_trait)]
#![feature(effects)]
#![feature(extern_types)]
#![feature(f128)]
#![feature(f16)]
#![feature(freeze_impls)]
#![feature(fundamental)]
#![feature(generic_arg_infer)]
Expand Down
8 changes: 7 additions & 1 deletion library/core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,17 @@ marker_impls! {
Copy for
usize, u8, u16, u32, u64, u128,
isize, i8, i16, i32, i64, i128,
f16, f32, f64, f128,
f32, f64,
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")]
Expand Down
Loading