1 2 3 4 5 6 7 8 9 10 11
/// Marker for types that can represent NaN. /// Implementers must ensure NaN is representable. pub trait HasNan {} macro_rules! impl_has_nan_for_float { ($($ty:ty),+ $(,)?) => { $(impl HasNan for $ty {})+ }; } impl_has_nan_for_float!(f32, f64);