Guard Real trait definition like its blanket impl for Float

This commit is contained in:
Yoan Lecoq 2019-09-04 12:32:01 +02:00 committed by Josh Stone
parent 1b28e6182d
commit 4b1ea5fb12
1 changed files with 1 additions and 0 deletions

View File

@ -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<Output = Self> {
/// Returns the smallest finite value that this type can represent.
///