about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/std/src/f16.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/f16.rs b/library/std/src/f16.rs
index bdbe3e21994..0af69dff05a 100644
--- a/library/std/src/f16.rs
+++ b/library/std/src/f16.rs
@@ -1321,12 +1321,14 @@ impl f16 {
     /// ```
     /// #![feature(f16)]
     /// #![feature(float_erf)]
+    /// # #[cfg(reliable_f16_math)] {
     /// let x: f16 = 0.123;
     ///
     /// let one = x.erf() + x.erfc();
     /// let abs_difference = (one - 1.0).abs();
     ///
     /// assert!(abs_difference <= f16::EPSILON);
+    /// # }
     /// ```
     #[rustc_allow_incoherent_impl]
     #[must_use = "method returns a new number and does not mutate the original value"]