Stream: git-wasmtime

Topic: wasmtime / PR #9958 Remove usage of `gen` as an identifier


view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2025 at 16:33):

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 our Cargo.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 the gen identifier (soon to be keyword) and we had quite a few instances of it. Where possible I've renamed to generator or generate or generated but when used as methods from upstream crate traits (e.g. RngCore::gen) we're forced to use r#gen. The rand 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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2025 at 16:33):

alexcrichton requested fitzgen for a review on PR #9958.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2025 at 16:33):

alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #9958.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2025 at 16:33):

alexcrichton requested wasmtime-core-reviewers for a review on PR #9958.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2025 at 16:33):

alexcrichton requested wasmtime-default-reviewers for a review on PR #9958.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2025 at 16:33):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2025 at 16:33):

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) its gen method to be easier to use in the 2024 edition.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2025 at 16:43):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2025 at 17:06):

alexcrichton merged PR #9958.


Last updated: Jan 24 2025 at 00:11 UTC