@@ -229,24 +229,20 @@ impl f16 {
229
229
/// This constant isn't guaranteed to equal to any specific NaN bitpattern,
230
230
/// and the stability of its representation over Rust versions
231
231
/// and target platforms isn't guaranteed.
232
- #[ cfg( not( bootstrap) ) ]
233
232
#[ allow( clippy:: eq_op) ]
234
233
#[ rustc_diagnostic_item = "f16_nan" ]
235
234
#[ unstable( feature = "f16" , issue = "116909" ) ]
236
235
pub const NAN : f16 = 0.0_f16 / 0.0_f16 ;
237
236
238
237
/// Infinity (∞).
239
- #[ cfg( not( bootstrap) ) ]
240
238
#[ unstable( feature = "f16" , issue = "116909" ) ]
241
239
pub const INFINITY : f16 = 1.0_f16 / 0.0_f16 ;
242
240
243
241
/// Negative infinity (−∞).
244
- #[ cfg( not( bootstrap) ) ]
245
242
#[ unstable( feature = "f16" , issue = "116909" ) ]
246
243
pub const NEG_INFINITY : f16 = -1.0_f16 / 0.0_f16 ;
247
244
248
245
/// Sign bit
249
- #[ cfg( not( bootstrap) ) ]
250
246
pub ( crate ) const SIGN_MASK : u16 = 0x8000 ;
251
247
252
248
/// Exponent mask
@@ -256,11 +252,9 @@ impl f16 {
256
252
pub ( crate ) const MAN_MASK : u16 = 0x03ff ;
257
253
258
254
/// Minimum representable positive value (min subnormal)
259
- #[ cfg( not( bootstrap) ) ]
260
255
const TINY_BITS : u16 = 0x1 ;
261
256
262
257
/// Minimum representable negative value (min negative subnormal)
263
- #[ cfg( not( bootstrap) ) ]
264
258
const NEG_TINY_BITS : u16 = Self :: TINY_BITS | Self :: SIGN_MASK ;
265
259
266
260
/// Returns `true` if this value is NaN.
@@ -278,7 +272,6 @@ impl f16 {
278
272
/// ```
279
273
#[ inline]
280
274
#[ must_use]
281
- #[ cfg( not( bootstrap) ) ]
282
275
#[ unstable( feature = "f16" , issue = "116909" ) ]
283
276
#[ allow( clippy:: eq_op) ] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :)
284
277
pub const fn is_nan ( self ) -> bool {
@@ -289,7 +282,6 @@ impl f16 {
289
282
// concerns about portability, so this implementation is for
290
283
// private use internally.
291
284
#[ inline]
292
- #[ cfg( not( bootstrap) ) ]
293
285
#[ rustc_const_unstable( feature = "const_float_classify" , issue = "72505" ) ]
294
286
pub ( crate ) const fn abs_private ( self ) -> f16 {
295
287
// SAFETY: This transmutation is fine. Probably. For the reasons std is using it.
@@ -317,7 +309,6 @@ impl f16 {
317
309
/// ```
318
310
#[ inline]
319
311
#[ must_use]
320
- #[ cfg( not( bootstrap) ) ]
321
312
#[ unstable( feature = "f16" , issue = "116909" ) ]
322
313
#[ rustc_const_unstable( feature = "const_float_classify" , issue = "72505" ) ]
323
314
pub const fn is_infinite ( self ) -> bool {
@@ -344,7 +335,6 @@ impl f16 {
344
335
/// ```
345
336
#[ inline]
346
337
#[ must_use]
347
- #[ cfg( not( bootstrap) ) ]
348
338
#[ unstable( feature = "f16" , issue = "116909" ) ]
349
339
#[ rustc_const_unstable( feature = "const_float_classify" , issue = "72505" ) ]
350
340
pub const fn is_finite ( self ) -> bool {
@@ -377,7 +367,6 @@ impl f16 {
377
367
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
378
368
#[ inline]
379
369
#[ must_use]
380
- #[ cfg( not( bootstrap) ) ]
381
370
#[ unstable( feature = "f16" , issue = "116909" ) ]
382
371
#[ rustc_const_unstable( feature = "const_float_classify" , issue = "72505" ) ]
383
372
pub const fn is_subnormal ( self ) -> bool {
@@ -408,7 +397,6 @@ impl f16 {
408
397
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
409
398
#[ inline]
410
399
#[ must_use]
411
- #[ cfg( not( bootstrap) ) ]
412
400
#[ unstable( feature = "f16" , issue = "116909" ) ]
413
401
#[ rustc_const_unstable( feature = "const_float_classify" , issue = "72505" ) ]
414
402
pub const fn is_normal ( self ) -> bool {
@@ -433,7 +421,6 @@ impl f16 {
433
421
/// # }
434
422
/// ```
435
423
#[ inline]
436
- #[ cfg( not( bootstrap) ) ]
437
424
#[ unstable( feature = "f16" , issue = "116909" ) ]
438
425
#[ rustc_const_unstable( feature = "const_float_classify" , issue = "72505" ) ]
439
426
pub const fn classify ( self ) -> FpCategory {
@@ -478,7 +465,6 @@ impl f16 {
478
465
/// but getting floats correct is important for not accidentally leaking const eval
479
466
/// runtime-deviating logic which may or may not be acceptable.
480
467
#[ inline]
481
- #[ cfg( not( bootstrap) ) ]
482
468
#[ rustc_const_unstable( feature = "const_float_classify" , issue = "72505" ) ]
483
469
const unsafe fn partial_classify ( self ) -> FpCategory {
484
470
// SAFETY: The caller is not asking questions for which this will tell lies.
@@ -593,7 +579,6 @@ impl f16 {
593
579
/// [`MIN`]: Self::MIN
594
580
/// [`MAX`]: Self::MAX
595
581
#[ inline]
596
- #[ cfg( not( bootstrap) ) ]
597
582
#[ unstable( feature = "f16" , issue = "116909" ) ]
598
583
// #[unstable(feature = "float_next_up_down", issue = "91399")]
599
584
pub fn next_up ( self ) -> Self {
@@ -648,7 +633,6 @@ impl f16 {
648
633
/// [`MIN`]: Self::MIN
649
634
/// [`MAX`]: Self::MAX
650
635
#[ inline]
651
- #[ cfg( not( bootstrap) ) ]
652
636
#[ unstable( feature = "f16" , issue = "116909" ) ]
653
637
// #[unstable(feature = "float_next_up_down", issue = "91399")]
654
638
pub fn next_down ( self ) -> Self {
@@ -685,7 +669,6 @@ impl f16 {
685
669
/// # }
686
670
/// ```
687
671
#[ inline]
688
- #[ cfg( not( bootstrap) ) ]
689
672
#[ unstable( feature = "f16" , issue = "116909" ) ]
690
673
#[ must_use = "this returns the result of the operation, without modifying the original" ]
691
674
pub fn recip ( self ) -> Self {
@@ -706,7 +689,6 @@ impl f16 {
706
689
/// # }
707
690
/// ```
708
691
#[ inline]
709
- #[ cfg( not( bootstrap) ) ]
710
692
#[ unstable( feature = "f16" , issue = "116909" ) ]
711
693
#[ must_use = "this returns the result of the operation, without modifying the original" ]
712
694
pub fn to_degrees ( self ) -> Self {
@@ -730,7 +712,6 @@ impl f16 {
730
712
/// # }
731
713
/// ```
732
714
#[ inline]
733
- #[ cfg( not( bootstrap) ) ]
734
715
#[ unstable( feature = "f16" , issue = "116909" ) ]
735
716
#[ must_use = "this returns the result of the operation, without modifying the original" ]
736
717
pub fn to_radians ( self ) -> f16 {
@@ -1167,7 +1148,6 @@ impl f16 {
1167
1148
/// ```
1168
1149
#[ inline]
1169
1150
#[ must_use]
1170
- #[ cfg( not( bootstrap) ) ]
1171
1151
#[ unstable( feature = "f16" , issue = "116909" ) ]
1172
1152
pub fn total_cmp ( & self , other : & Self ) -> crate :: cmp:: Ordering {
1173
1153
let mut left = self . to_bits ( ) as i16 ;
@@ -1226,7 +1206,6 @@ impl f16 {
1226
1206
/// # }
1227
1207
/// ```
1228
1208
#[ inline]
1229
- #[ cfg( not( bootstrap) ) ]
1230
1209
#[ unstable( feature = "f16" , issue = "116909" ) ]
1231
1210
#[ must_use = "method returns a new number and does not mutate the original value" ]
1232
1211
pub fn clamp ( mut self , min : f16 , max : f16 ) -> f16 {
0 commit comments