Explorar el Código

Update float.rs

XAMPPRocky hace 3 años
padre
commit
cabfb0b904
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/float.rs

+ 3 - 0
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());