From cabfb0b90497ba5d908d14a908dd269f03cc5f4d Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Thu, 28 Oct 2021 09:15:39 +0200 Subject: [PATCH] Update float.rs --- src/float.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/float.rs b/src/float.rs index 87fcc4d7..5c8da695 100644 --- a/src/float.rs +++ b/src/float.rs @@ -2304,6 +2304,7 @@ mod tests { } #[test] + #[cfg(any(feature = "std", feature = "libm"))] fn copysign() { use float::Float; test_copysign_generic(2.0_f32, -2.0_f32, f32::nan()); @@ -2311,7 +2312,9 @@ mod tests { test_copysignf(2.0_f32, -2.0_f32, f32::nan()); } + #[cfg(any(feature = "std", feature = "libm"))] fn test_copysignf(p: f32, n: f32, nan: f32) { + use float::Float; use core::ops::Neg; assert!(p.is_sign_positive());