Skip to content

Commit cabfb0b

Browse files
XAMPPRockycuviper
authored andcommitted
Update float.rs
1 parent 7ca2456 commit cabfb0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/float.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,14 +2304,17 @@ mod tests {
23042304
}
23052305

23062306
#[test]
2307+
#[cfg(any(feature = "std", feature = "libm"))]
23072308
fn copysign() {
23082309
use float::Float;
23092310
test_copysign_generic(2.0_f32, -2.0_f32, f32::nan());
23102311
test_copysign_generic(2.0_f64, -2.0_f64, f64::nan());
23112312
test_copysignf(2.0_f32, -2.0_f32, f32::nan());
23122313
}
23132314

2315+
#[cfg(any(feature = "std", feature = "libm"))]
23142316
fn test_copysignf(p: f32, n: f32, nan: f32) {
2317+
use float::Float;
23152318
use core::ops::Neg;
23162319

23172320
assert!(p.is_sign_positive());

0 commit comments

Comments
 (0)