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

Upgrade to edition 2024 #172

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Upgrade to edition 2024 #172

wants to merge 1 commit into from

Conversation

sarsko
Copy link
Contributor

@sarsko sarsko commented Mar 6, 2025

The 2024 edition has been released. This PR upgrades to it.

I followed this guide:

https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html.

Most of the changes were automatically applied. The only ones that were not were the let value = unsafe { &self.raw_load() }; changes I made, which are due to https://doc.rust-lang.org/edition-guide/rust-2024/temporary-tail-expr-scope.html.

One thing to note is that the thread_local! and lazy_static! macros now have expr_2021s, rather than exprs. This is correct, as std is still on 2021 (https://github.com/rust-lang/rust/blob/master/library/std/Cargo.toml) and lazy static is on 2015 (https://github.com/rust-lang-nursery/lazy-static.rs/blob/master/Cargo.toml).

I renamed a couple of places where gen was used as a variable name (as it is now a keyword). I'll just leave a heads up here that rand has gone away from gen (and all other gen_ functions) in 0.9, in addition to a fair bit of other API changes (see: https://github.com/rust-random/rand/releases/tag/0.9.0). This is for sure going to be fun whenever people start migrating. The easiest here might be to provide both the new and the old APIs.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Verified

This commit was signed with the committer’s verified signature.
sarsko Sarek Høverstad Skotåm
@sarsko sarsko enabled auto-merge (squash) March 6, 2025 11:31
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.

None yet

1 participant