Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!
andlazy_static!
macros now haveexpr_2021
s, rather thanexprs
. 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 fromgen
(and all othergen_
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.