alexcrichton opened PR #9958 from alexcrichton:start-2024-migration
to bytecodealliance:main
:
This commit is a start to some preparation for the Rust 2024 edition for Wasmtime and this workspace. The
rust-2024-compatibility
lint group in rustc, currently off-by-default, is intended to assist with migrating code to prepare for the 2024 edition. Some of those lints though are, in my opinion, far too noisy to be turned on so this PR doesn't turn on the whole group. Instead though I plan on enabling individual lints over time in ourCargo.toml
before the 2024 edition is enabled. This should hopefully provide a relatively smooth and less churn-y path to enabling the 2024 edition in the future.The first lint enabled here in this commit is the
keyword_idents_2024
lint which warns against usage of identifiers that will become keywords in the 2024 edition. The only one affecting Wasmtime is thegen
identifier (soon to be keyword) and we had quite a few instances of it. Where possible I've renamed togenerator
orgenerate
orgenerated
but when used as methods from upstream crate traits (e.g.RngCore::gen
) we're forced to user#gen
. Therand
crate will be updated in 0.9.0 to avoid this keyword so this shouldn't be permanent.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested fitzgen for a review on PR #9958.
alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #9958.
alexcrichton requested wasmtime-core-reviewers for a review on PR #9958.
alexcrichton requested wasmtime-default-reviewers for a review on PR #9958.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
cc @sunfishcode on this in case you weren't already aware, but eventually
cap-rand
will probably want to rename (or at least provide an alternative to) itsgen
method to be easier to use in the 2024 edition.
pchickey submitted PR review.
alexcrichton merged PR #9958.
Last updated: Jan 24 2025 at 00:11 UTC