Set edition = "2021" for all Rust targets#28137
Open
korran wants to merge 1 commit into
Open
Conversation
Explicitly set edition to "2021" for all Rust libraries, tests, and binaries. This prevents build failures when the default toolchain uses a different edition (like 2024) which is incompatible with these files.
877f016 to
25f437d
Compare
Contributor
|
Google Cloud minimum supported rustc is 1.85.0 which is when Edition 2024 was introduced so I think we could bump to 2024 here. Google internally is on 2021 by default today still which is why 2024 issues could slip through, but I looked at what breaks if we just bump to edition="2024" instead and I didn't get any breakages on either our internal or external CI (External version of the change: #28140) Can you clarify what issue you saw with a 2024-default toolchain that caused you to send this PR? I want to make sure I understand if we have missing CI coverage or something as well. Thanks! |
Contributor
|
Actually looking closer I think our setting to 2024 in the toolchain setup in our bzlmod file is what is supposed to take care of this. |
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.
Explicitly set edition to "2021" for all Rust libraries, tests, and binaries. This prevents build failures when the default toolchain uses a different edition (like 2024) which is incompatible with these files.