chore: upgrade remaining crates to Rust 2021 edition#966
Merged
guybedford merged 3 commits intocloudflare:mainfrom Apr 9, 2026
Merged
chore: upgrade remaining crates to Rust 2021 edition#966guybedford merged 3 commits intocloudflare:mainfrom
guybedford merged 3 commits intocloudflare:mainfrom
Conversation
Updates `worker`, `worker-codegen`, and `test` crates from edition 2018 to 2021. The other crates (worker-build, worker-macros, worker-sys, benchmark) were already on 2021. Rust 2021 edition was released in October 2021 with Rust 1.56, provides improved feature resolver behavior (which prompted this issue via cloudflare#324), and brings the minimum supported Rust version to 1.56. Fixes cloudflare#325
Merging this PR will not alter performance
|
guybedford
previously approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Upgrades the 3 remaining crates (
worker,worker-codegen,test) from Rust edition 2018 to 2021. The other 4 crates were already on 2021.Why this matters
Issue #325 was prompted by a bug caused by the old feature resolver in edition 2018, where
miowas being compiled as a dependency oftokiodespite no features being enabled. Edition 2021 uses the v2 resolver by default, preventing this class of issues.Changes
worker/Cargo.toml: edition 2018 -> 2021worker-codegen/Cargo.toml: edition 2018 -> 2021test/Cargo.toml: edition 2018 -> 2021Fixes #325
This contribution was developed with AI assistance (Claude Code).