fix build errors when `std` is disabled
authorJacob Lifshay <programmerjake@gmail.com>
Thu, 13 May 2021 01:02:23 +0000 (18:02 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Thu, 13 May 2021 01:02:23 +0000 (18:02 -0700)
src/algorithms/trig_pi.rs
src/prim.rs

index 93d2efc9d6f188e6d2de4df87c90c006a4c54ad0..1dca80a33522bc333f85e89909b96e37b9577ab3 100644 (file)
@@ -1,6 +1,5 @@
 use crate::{
-    f16::F16,
-    prim::{PrimFloat, PrimSInt, PrimUInt},
+    prim::{PrimFloat, PrimUInt},
     traits::{Compare, Context, ConvertFrom, ConvertTo, Float, Make, Select},
 };
 
index 184e5fcec9d5ac6d6a9a6037a14a5606b5a175e0..19f4270b2185d9099d3741e23be9f8b88a8326f5 100644 (file)
@@ -187,7 +187,10 @@ macro_rules! impl_float {
                 self.to_bits()
             }
             fn abs(self) -> Self {
-                $float::abs(self)
+                #[cfg(feature = "std")]
+                return $float::abs(self);
+                #[cfg(not(feature = "std"))]
+                todo!();
             }
         }
     };