diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs
index d050d21c8c575..f5c2d1c6bf682 100644
--- a/library/core/src/num/f32.rs
+++ b/library/core/src/num/f32.rs
@@ -800,7 +800,7 @@ impl f32 {
     /// let angle = std::f32::consts::PI;
     ///
     /// let abs_difference = (angle.to_degrees() - 180.0).abs();
-    ///
+    /// # #[cfg(any(not(target_arch = "x86"), target_feature = "sse2"))]
     /// assert!(abs_difference <= f32::EPSILON);
     /// ```
     #[must_use = "this returns the result of the operation, \