mirror of
https://git.freebsd.org/ports.git
synced 2025-07-07 20:39:18 -04:00
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)
13 lines
587 B
Rust
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))))
|
|
}
|
|
}
|