ports/devel/dtool/files/patch-cargo-crates_rustc-serialize-0.3.24_src_serialize.rs
Mikael Urankar f22f38c881 devel/dtool: Fix build with rust-1.76.0
Import upstream patch [1] to fix the following error:

error[E0310]: the parameter type `T` may not live long enough
    --> /wrkdirs/usr/ports/devel/dtool/work/dtool-0.12.0/cargo-crates/rustc-serialize-0.3.24/src/serialize.rs:1155:5

[1] 75ce92452a

PR:		276920
Approved by:	portmgr (build fix blanket)
2024-02-19 12:59:02 +01:00

13 lines
587 B
Rust

https://github.com/rust-lang-deprecated/rustc-serialize/commit/75ce92452a5f7c25a58fdea81e5f6f888630a2c9
--- cargo-crates/rustc-serialize-0.3.24/src/serialize.rs.orig 2024-02-10 11:58:37 UTC
+++ cargo-crates/rustc-serialize-0.3.24/src/serialize.rs
@@ -1152,7 +1152,7 @@ impl<'a, T: ?Sized> Decodable for Cow<'a, T>
where T: ToOwned, T::Owned: Decodable
{
#[inline]
- fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'static, T>, D::Error> {
+ fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'a, T>, D::Error> {
Ok(Cow::Owned(try!(Decodable::decode(d))))
}
}