From 4b1ea5fb12df3b21e0099cca3092a2506ad2a550 Mon Sep 17 00:00:00 2001 From: Yoan Lecoq Date: Wed, 4 Sep 2019 12:32:01 +0200 Subject: [PATCH] Guard Real trait definition like its blanket impl for Float --- src/real.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/real.rs b/src/real.rs index 6ee1701..1c2bef7 100644 --- a/src/real.rs +++ b/src/real.rs @@ -16,6 +16,7 @@ use Float; /// /// This trait is always available, however it requires either `std` or `libm` /// in order for `f32` and `f64` to implement it. +#[cfg(any(feature = "std", feature = "libm"))] pub trait Real: Num + Copy + NumCast + PartialOrd + Neg { /// Returns the smallest finite value that this type can represent. ///