Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error in the latest nightly #119041

Closed
amircodota opened this issue Dec 17, 2023 · 2 comments
Closed

Compilation error in the latest nightly #119041

amircodota opened this issue Dec 17, 2023 · 2 comments
Labels
C-discussion Category: Discussion or questions that doesn't represent real issues. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@amircodota
Copy link

When I compile my code with the latest nightly I get the following error

.cargo/registry/src/index.crates.io-6f17d22bba15001f/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
    --> /rustc/445177724ac2beebf4faa5a3ffacb2adbe7e7846/library/alloc/src/borrow.rs:180:30
help: consider adding an explicit lifetime bound
     |
1151 | impl<'a, T: ?Sized + 'static> Decodable for Cow<'a, T>
     |                    +++++++++

For more information about this error, try `rustc --explain E0310`.
error: could not compile `rustc-serialize` (lib) due to 1 previous error

This is a regreession - we compile every night with the latest nightly and never ran into this before.

@amircodota amircodota added the C-bug Category: This is a bug. label Dec 17, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 17, 2023
@Noratrieb Noratrieb added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 17, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Dec 17, 2023
@Noratrieb
Copy link
Member

Noratrieb commented Dec 17, 2023

Thank you for the report! It would be useful to bisect the regression using cargo-bisect-rustc to make it easier to figure out what happened and ping the relevant people.

Oh, I just see, this is rustc-serialize. This is a known and expected regression, a patch has been released for rustc-serialize that makes it work again.

Also you should really consider moving off rustc-serialize, it's deprecated and unmaintained (getting patch releases for problems like this is not something expected in the future). Use serde or one of the many other serialization options instead.

@Noratrieb Noratrieb added C-discussion Category: Discussion or questions that doesn't represent real issues. and removed C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Dec 17, 2023
@Noratrieb Noratrieb closed this as not planned Won't fix, can't repro, duplicate, stale Dec 17, 2023
@amircodota
Copy link
Author

Thanks.

It is not a direct dependency.

But I guess these are some old crates I need to upgrade. Will take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-discussion Category: Discussion or questions that doesn't represent real issues. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants