Skip to content

Commit 6ba9c12

Browse files
committed
Float copysign does not exist in libcore yet
1 parent d2fcc34 commit 6ba9c12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

serde/src/de/impls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ macro_rules! num_as_copysign_self {
187187
where
188188
E: Error,
189189
{
190-
#[cfg(no_float_copysign)]
190+
#[cfg(any(no_float_copysign, not(feature = "std")))]
191191
{
192192
Ok(v as Self::Value)
193193
}
194194

195-
#[cfg(not(no_float_copysign))]
195+
#[cfg(all(not(no_float_copysign), feature = "std"))]
196196
{
197197
// Preserve sign of NaN. The `as` produces a nondeterministic sign.
198198
let sign = if v.is_sign_positive() { 1.0 } else { -1.0 };

0 commit comments

Comments
 (0)