summarylogtreecommitdiffstats
path: root/mp4parse_macro_mul.patch
blob: a14dbf2222a2e4024805d585f61de32dc15ac243 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- a/third_party/rust/mp4parse/src/lib.rs
+++ b/third_party/rust/mp4parse/src/lib.rs
@@ -3184,8 +3184,8 @@
             type Output = $output;

             fn mul(self, rhs: $rhs) -> Self::Output {
-                static_assertions::const_assert!(<$output>::MAX <= <$inner>::MAX as u64);
-                static_assertions::const_assert!(<$lhs>::MAX * <$rhs>::MAX <= <$output>::MAX);
+                static_assertions::const_assert!(<$output as UpperBounded>::MAX <= <$inner>::MAX as u64);
+                static_assertions::const_assert!(<$lhs as UpperBounded>::MAX * <$rhs as UpperBounded>::MAX <= <$output as UpperBounded>::MAX);

                 let lhs: $inner = self.get().into();
                 let rhs: $inner = rhs.get().into();