Fix warnings with the stable Rust toolchain #1099
Merged
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.
As getting a ref
&
ofstatic mut
variables will become a compilation error in the Rust 2024 Edition, we useunsafe { &*addr_of!(VM_LAYOUT) }
to work around it. See: #1098Changed the
static mut
in mock_test_doc_avoid_resolving_allocator.rs to an ordinary local variable.Initialize the thread-local variable
WORKER_ORDINAL
with aconst
block. It avoids lazy initialization. We also bumped therust-version
field in Cargo.toml to 1.71.1 because the semantics of theconst
block in thethread_local!
macro was undocumented in 1.70.0.