Commit Graph

2 Commits

Author SHA1 Message Date
Eike Rathke
8fff355b31 Adjust third_party/rust/mp4parse/src/lib.rs checksum
This is all fragile.. if things are changing it would be better to add
to Cargo.toml

    [patch.crates-io.mp4parse]
    path = "third_party/rust/mp4parse"

and then execute `mach vendor rust`
2023-06-08 15:37:50 +02:00
Eike Rathke
6ed875ba67 Add mp4parse-rust patch to build with rust 1.70
Discovered as
8b5b652d38
apparently its commit summary "Fix unstable-name-collisions warning by using
fully qualified path" being completely unrelated to this confusing error
message:

    error[E0277]: the trait bound `u64: Mul<NonZeroU8>` is not satisfied
	--> /builddir/build/BUILD/thunderbird-102.11.1/third_party/rust/mp4parse/src/lib.rs:3188:62
	 |
    3188 |                 static_assertions::const_assert!(<$lhs>::MAX * <$rhs>::MAX <= <$output>::MAX);
	 |                                                              ^ no implementation for `u64 * NonZeroU8`
    ...
    3198 | impl_mul!((U8, std::num::NonZeroU8) => (U16, u16));
	 | -------------------------------------------------- in this macro invocation
	 |
	 = help: the trait `~const Mul<NonZeroU8>` is not implemented for `u64`
	 = help: the following other types implement trait `Mul<Rhs>`:
		   <&'a u64 as Mul<u64>>
		   <&u64 as Mul<&u64>>
		   <u64 as Mul<&u64>>
		   <u64 as Mul>
	 = note: this error originates in the macro `impl_mul` (in Nightly builds, run with -Z macro-backtrace for more info)
    note: erroneous constant used
	--> /builddir/build/BUILD/thunderbird-102.11.1/third_party/rust/mp4parse/src/lib.rs:3198:1
	 |
    3198 | impl_mul!((U8, std::num::NonZeroU8) => (U16, u16));
	 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	 |
	 = note: this note originates in the macro `static_assertions::const_assert` which comes from the expansion of the macro `impl_mul` (in Nightly builds, run with -Z macro-backtrace for more info)
    error[E0277]: the trait bound `u64: Mul<NonZeroU8>` is not satisfied
	--> /builddir/build/BUILD/thunderbird-102.11.1/third_party/rust/mp4parse/src/lib.rs:3188:62
	 |
    3188 |                 static_assertions::const_assert!(<$lhs>::MAX * <$rhs>::MAX <= <$output>::MAX);
	 |                                                              ^ no implementation for `u64 * NonZeroU8`
    ...
    3199 | impl_mul!((U32, std::num::NonZeroU8) => (U32MulU8, u64));
	 | -------------------------------------------------------- in this macro invocation
	 |
	 = help: the trait `~const Mul<NonZeroU8>` is not implemented for `u64`
	 = help: the following other types implement trait `Mul<Rhs>`:
		   <&'a u64 as Mul<u64>>
		   <&u64 as Mul<&u64>>
		   <u64 as Mul<&u64>>
		   <u64 as Mul>
	 = note: this error originates in the macro `impl_mul` (in Nightly builds, run with -Z macro-backtrace for more info)
    note: erroneous constant used
	--> /builddir/build/BUILD/thunderbird-102.11.1/third_party/rust/mp4parse/src/lib.rs:3199:1
	 |
    3199 | impl_mul!((U32, std::num::NonZeroU8) => (U32MulU8, u64));
	 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	 |
	 = note: this note originates in the macro `static_assertions::const_assert` which comes from the expansion of the macro `impl_mul` (in Nightly builds, run with -Z macro-backtrace for more info)
    For more information about this error, try `rustc --explain E0277`.
    error: could not compile `mp4parse` (lib) due to 2 previous errors
2023-06-08 14:38:15 +02:00