Browse Source

Mask deprecation warnings on abs_sub

Josh Stone 8 năm trước cách đây
mục cha
commit
b21c89de36
2 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 1 0
      traits/src/float.rs
  2. 1 0
      traits/src/sign.rs

+ 1 - 0
traits/src/float.rs

@@ -1003,6 +1003,7 @@ macro_rules! float_impl {
                 <$T>::min(self, other)
             }
 
+            #[allow(deprecated)]
             fn abs_sub(self, other: Self) -> Self {
                 <$T>::abs_sub(self, other)
             }

+ 1 - 0
traits/src/sign.rs

@@ -86,6 +86,7 @@ macro_rules! signed_float_impl {
             /// less than or equal to `other`, otherwise the difference between`self`
             /// and `other` is returned.
             #[inline]
+            #[allow(deprecated)]
             fn abs_sub(&self, other: &$t) -> $t {
                 <$t>::abs_sub(*self, *other)
             }