Skip to content

Update rustc-serialize to 0.3.25#38

Open
hcl-dr wants to merge 1 commit intoabaumhauer:masterfrom
hcl-dr:bugfix/rustc-serialize
Open

Update rustc-serialize to 0.3.25#38
hcl-dr wants to merge 1 commit intoabaumhauer:masterfrom
hcl-dr:bugfix/rustc-serialize

Conversation

@hcl-dr
Copy link
Copy Markdown

@hcl-dr hcl-dr commented Apr 10, 2024

Fixes lifetime issue in rustc-serialize 0.3.24


Compiling rustc-serialize v0.3.24
error[E0310]: the parameter type `T` may not live long enough
    --> rustc-serialize-0.3.24/src/serialize.rs:1155:5
     |
1155 |     fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'static, T>, D::Error> {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |     |
     |     the parameter type `T` must be valid for the static lifetime...
     |     ...so that the type `T` will meet its required lifetime bounds...
     |
note: ...that is required by this bound
    --> rustlib/src/rust/library/alloc/src/borrow.rs:180:30
     |
180  | pub enum Cow<'a, B: ?Sized + 'a>
     |                              ^^
help: consider adding an explicit lifetime bound
     |
1151 | impl<'a, T: ?Sized + 'static> Decodable for Cow<'a, T>
     |                    +++++++++

Fixes lifetime issue in 0.3.24

   Compiling rustc-serialize v0.3.24
error[E0310]: the parameter type `T` may not live long enough
    --> rustc-serialize-0.3.24/src/serialize.rs:1155:5
     |
1155 |     fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'static, T>, D::Error> {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |     |
     |     the parameter type `T` must be valid for the static lifetime...
     |     ...so that the type `T` will meet its required lifetime bounds...
     |
note: ...that is required by this bound
    --> rustlib/src/rust/library/alloc/src/borrow.rs:180:30
     |
180  | pub enum Cow<'a, B: ?Sized + 'a>
     |                              ^^
help: consider adding an explicit lifetime bound
     |
1151 | impl<'a, T: ?Sized + 'static> Decodable for Cow<'a, T>
     |                    +++++++++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant