Skip to content

Commit ceab612

Browse files
committed
Auto merge of rust-lang#123390 - tgross35:f16-f128-libs-basic-impls-bootstrap, r=jhpratt
Put basic impls for f16 and f128 behind cfg(not(bootstrap)) We will lose `f16` and `f128` in the beta compiler after the revert for <rust-lang#123282> lands. Change what was added in <rust-lang#123085> to be behind `#[cfg(not(bootstrap))]` to account for this.
2 parents 99c42d2 + 049a917 commit ceab612

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

library/core/src/clone.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,13 @@ mod impls {
227227
impl_clone! {
228228
usize u8 u16 u32 u64 u128
229229
isize i8 i16 i32 i64 i128
230-
f16 f32 f64 f128
230+
f32 f64
231231
bool char
232232
}
233233

234+
#[cfg(not(bootstrap))]
235+
impl_clone! { f16 f128 }
236+
234237
#[unstable(feature = "never_type", issue = "35121")]
235238
impl Clone for ! {
236239
#[inline]

library/core/src/cmp.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -1497,9 +1497,12 @@ mod impls {
14971497
}
14981498

14991499
partial_eq_impl! {
1500-
bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f16 f32 f64 f128
1500+
bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64
15011501
}
15021502

1503+
#[cfg(not(bootstrap))]
1504+
partial_eq_impl! { f16 f128 }
1505+
15031506
macro_rules! eq_impl {
15041507
($($t:ty)*) => ($(
15051508
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1550,7 +1553,10 @@ mod impls {
15501553
}
15511554
}
15521555

1553-
partial_ord_impl! { f16 f32 f64 f128 }
1556+
partial_ord_impl! { f32 f64 }
1557+
1558+
#[cfg(not(bootstrap))]
1559+
partial_ord_impl! { f16 f128 }
15541560

15551561
macro_rules! ord_impl {
15561562
($($t:ty)*) => ($(

library/core/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@
205205
//
206206
// Language features:
207207
// tidy-alphabetical-start
208+
#![cfg_attr(not(bootstrap), feature(f128))]
209+
#![cfg_attr(not(bootstrap), feature(f16))]
208210
#![feature(abi_unadjusted)]
209211
#![feature(adt_const_params)]
210212
#![feature(allow_internal_unsafe)]
@@ -229,8 +231,6 @@
229231
#![feature(doc_notable_trait)]
230232
#![feature(effects)]
231233
#![feature(extern_types)]
232-
#![feature(f128)]
233-
#![feature(f16)]
234234
#![feature(freeze_impls)]
235235
#![feature(fundamental)]
236236
#![feature(generic_arg_infer)]

library/core/src/marker.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,17 @@ marker_impls! {
422422
Copy for
423423
usize, u8, u16, u32, u64, u128,
424424
isize, i8, i16, i32, i64, i128,
425-
f16, f32, f64, f128,
425+
f32, f64,
426426
bool, char,
427427
{T: ?Sized} *const T,
428428
{T: ?Sized} *mut T,
429+
}
429430

431+
#[cfg(not(bootstrap))]
432+
marker_impls! {
433+
#[stable(feature = "rust1", since = "1.0.0")]
434+
Copy for
435+
f16, f128,
430436
}
431437

432438
#[unstable(feature = "never_type", issue = "35121")]

0 commit comments

Comments
 (0)