Преглед на файлове

Merge #128

128: Fix unstable_name_collisions in Bounded for Wrapping r=cuviper a=cuviper



Co-authored-by: Josh Stone <cuviper@gmail.com>
bors[bot] преди 5 години
родител
ревизия
4fc3d8f72d
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      src/bounds.rs

+ 4 - 4
src/bounds.rs

@@ -95,8 +95,8 @@ fn wrapping_bounded() {
     macro_rules! test_wrapping_bounded {
         ($($t:ty)+) => {
             $(
-                assert_eq!(Wrapping::<$t>::min_value().0, <$t>::min_value());
-                assert_eq!(Wrapping::<$t>::max_value().0, <$t>::max_value());
+                assert_eq!(<Wrapping<$t> as Bounded>::min_value().0, <$t>::min_value());
+                assert_eq!(<Wrapping<$t> as Bounded>::max_value().0, <$t>::max_value());
             )+
         };
     }
@@ -110,8 +110,8 @@ fn wrapping_bounded_i128() {
     macro_rules! test_wrapping_bounded {
         ($($t:ty)+) => {
             $(
-                assert_eq!(Wrapping::<$t>::min_value().0, <$t>::min_value());
-                assert_eq!(Wrapping::<$t>::max_value().0, <$t>::max_value());
+                assert_eq!(<Wrapping<$t> as Bounded>::min_value().0, <$t>::min_value());
+                assert_eq!(<Wrapping<$t> as Bounded>::max_value().0, <$t>::max_value());
             )+
         };
     }