@@ -509,12 +509,15 @@ impl f16 {
509509 /// #![feature(f16)]
510510 /// # // FIXME(f16_f128): remove when `extendhfsf2` and `truncsfhf2` are available
511511 /// # #[cfg(target_os = "linux")] {
512+ /// # // FIXME(f16_f128): remove when `__gnu_h2f_ieee` and `__gnu_f2h_ieee` are available
513+ /// # #[cfg(not(all(target_arch = "mips", target_os = "linux")))] {
512514 ///
513515 /// let x = 2.0_f16;
514516 /// let abs_difference = (x.recip() - (1.0 / x)).abs();
515517 ///
516518 /// assert!(abs_difference <= f16::EPSILON);
517519 /// # }
520+ /// # }
518521 /// ```
519522 #[ inline]
520523 #[ cfg( not( bootstrap) ) ]
@@ -530,12 +533,15 @@ impl f16 {
530533 /// #![feature(f16)]
531534 /// # // FIXME(f16_f128): remove when `extendhfsf2` and `truncsfhf2` are available
532535 /// # #[cfg(target_os = "linux")] {
536+ /// # // FIXME(f16_f128): remove when `__gnu_h2f_ieee` and `__gnu_f2h_ieee` are available
537+ /// # #[cfg(not(all(target_arch = "mips", target_os = "linux")))] {
533538 ///
534539 /// let angle = std::f16::consts::PI;
535540 ///
536541 /// let abs_difference = (angle.to_degrees() - 180.0).abs();
537542 /// assert!(abs_difference <= 0.5);
538543 /// # }
544+ /// # }
539545 /// ```
540546 #[ inline]
541547 #[ cfg( not( bootstrap) ) ]
@@ -553,13 +559,16 @@ impl f16 {
553559 /// #![feature(f16)]
554560 /// # // FIXME(f16_f128): remove when `extendhfsf2` and `truncsfhf2` are available
555561 /// # #[cfg(target_os = "linux")] {
562+ /// # // FIXME(f16_f128): remove when `__gnu_h2f_ieee` and `__gnu_f2h_ieee` are available
563+ /// # #[cfg(not(all(target_arch = "mips", target_os = "linux")))] {
556564 ///
557565 /// let angle = 180.0f16;
558566 ///
559567 /// let abs_difference = (angle.to_radians() - std::f16::consts::PI).abs();
560568 ///
561569 /// assert!(abs_difference <= 0.01);
562570 /// # }
571+ /// # }
563572 /// ```
564573 #[ inline]
565574 #[ cfg( not( bootstrap) ) ]
@@ -870,6 +879,8 @@ impl f16 {
870879 ///
871880 /// ```
872881 /// #![feature(f16)]
882+ /// # // FIXME(f16_f128): remove when `__gnu_h2f_ieee` and `__gnu_f2h_ieee` are available
883+ /// # #[cfg(not(all(target_arch = "mips", target_os = "linux")))] {
873884 ///
874885 /// struct GoodBoy {
875886 /// name: &'static str,
@@ -897,6 +908,7 @@ impl f16 {
897908 /// .zip([-5.0, 0.1, 10.0, 99.0, f16::INFINITY, f16::NAN].iter())
898909 /// .for_each(|(a, b)| assert_eq!(a.to_bits(), b.to_bits()))
899910 /// }
911+ /// # }
900912 /// ```
901913 #[ inline]
902914 #[ must_use]
0 commit comments