8000 Update to Rust 1.85 and Rust 2024 Edition by anelson · Pull Request #155 · elastio/ssstar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update to Rust 1.85 and Rust 2024 Edition #155

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

Merged
merged 10 commits into from
Mar 2, 2025
Merged

Conversation

anelson
Copy link
Collaborator
@anelson anelson commented Mar 2, 2025

This was a pretty easy transition, cargo fix and cargo fmt did almost everything. I updated to rand 0.9 which deprecates the gen* methods now that gen is a reserved keyword, and there was one place where I had to add a use<> impl trait bound.

anelson added 10 commits March 2, 2025 14:43
In 2021 edition, `impl Trait` in return position was assumed not to use any type params or lifetimes, but now in 2024 edition it is permitted to use by any lifetimes or type params in the function signature.
Maybe that makes sense as a default, but there was one place where the old behavior was assumed, and broke under the new behavior.

See https://blog.rust-lang.org/2024/09/05/impl-trait-capture-rules.html#impl-traits-can-include-a-use-bound-to-specify-precisely-which-generic-types-and-lifetimes-they-use
I didn't want to do this as part of the Rust 2024 edition migration, but
it's so out of date now that it's breaking the build.  I could expend
some energy to modify the build to use a deliberately ancient version of
the tool, or I can use that to migrate to the new version.  Hopefully I
made the right decision.
This is another yak shave that isn't directly related to the update to
Rust 2024 edition but it getting in the way of landing it.  The GHA
build used an ancient version of cargo-udeps that worked on an ancient
version of nightly.  The rest of the company's projects have long since
moved on from this.  So I'm switching to cargo-machete, which found some
unused deps that I also removed.
@anelson anelson requested review from oandrukh and Veetaha March 2, 2025 15:19
@anelson anelson merged commit 268184a into master Mar 2, 2025
9 checks passed
@anelson anelson deleted the chore/update-to-rust-2024 branch March 2, 2025 19:24
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.

3 participants
0