feat: Add edition for scripts anytime we mutate the manifest#17038
Merged
Conversation
Collaborator
|
r? @ehuss rustbot has assigned @ehuss. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
Collaborator
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
weihanglo
approved these changes
May 28, 2026
| @@ -1,4 +1,7 @@ | |||
| --- | |||
| [package] | |||
| edition = "2024" | |||
Member
There was a problem hiding this comment.
So when edition 2027 is out we'll need to update these snapshots?
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
May 28, 2026
Member
|
linux x86-64 stable requeuing |
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Jun 3, 2026
Update cargo submodule 14 commits in fbb61be30e5f9ac3a6ad58e56a5c0f5db2d2b3ef..0b1123a48825309b697312b44fdb64b3df00c958 2026-05-26 15:08:03 +0000 to 2026-06-01 21:20:28 +0000 - chore(deps): update rust crate git2 to 0.21.0 (rust-lang/cargo#17060) - chore(deps): update compatible (rust-lang/cargo#17057) - fix(util): constant type for Redox OS (rust-lang/cargo#17064) - chore(deps): update crate-ci/typos action to v1.47.0 (rust-lang/cargo#17059) - chore(deps): update embarkstudios/cargo-deny-action action to v2.0.20 (rust-lang/cargo#17058) - chore(deps): update cargo-semver-checks to v0.48.0 (rust-lang/cargo#17054) - chore: bump to 0.99.0; update changelog (rust-lang/cargo#17049) - Bump cargo-util-schemas to 0.14.2 (rust-lang/cargo#17048) - feat: Add edition for scripts anytime we mutate the manifest (rust-lang/cargo#17038) - docs: clarify on crate removal post RFC 3660 (rust-lang/cargo#17036) - feat: Add --output-format=json to cargo doc as an unstable option (rust-lang/cargo#17025) - feat(diag): Add the 'cargo::default' group (rust-lang/cargo#17033) - fix(add): Ensure erros are lower case (rust-lang/cargo#17037) - fix(diag): Report summaries for unused_deps (rust-lang/cargo#17034)
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Jun 3, 2026
Update cargo submodule 14 commits in fbb61be30e5f9ac3a6ad58e56a5c0f5db2d2b3ef..0b1123a48825309b697312b44fdb64b3df00c958 2026-05-26 15:08:03 +0000 to 2026-06-01 21:20:28 +0000 - chore(deps): update rust crate git2 to 0.21.0 (rust-lang/cargo#17060) - chore(deps): update compatible (rust-lang/cargo#17057) - fix(util): constant type for Redox OS (rust-lang/cargo#17064) - chore(deps): update crate-ci/typos action to v1.47.0 (rust-lang/cargo#17059) - chore(deps): update embarkstudios/cargo-deny-action action to v2.0.20 (rust-lang/cargo#17058) - chore(deps): update cargo-semver-checks to v0.48.0 (rust-lang/cargo#17054) - chore: bump to 0.99.0; update changelog (rust-lang/cargo#17049) - Bump cargo-util-schemas to 0.14.2 (rust-lang/cargo#17048) - feat: Add edition for scripts anytime we mutate the manifest (rust-lang/cargo#17038) - docs: clarify on crate removal post RFC 3660 (rust-lang/cargo#17036) - feat: Add --output-format=json to cargo doc as an unstable option (rust-lang/cargo#17025) - feat(diag): Add the 'cargo::default' group (rust-lang/cargo#17033) - fix(add): Ensure erros are lower case (rust-lang/cargo#17037) - fix(diag): Report summaries for unused_deps (rust-lang/cargo#17034)
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Jun 3, 2026
Update cargo submodule 14 commits in fbb61be30e5f9ac3a6ad58e56a5c0f5db2d2b3ef..0b1123a48825309b697312b44fdb64b3df00c958 2026-05-26 15:08:03 +0000 to 2026-06-01 21:20:28 +0000 - chore(deps): update rust crate git2 to 0.21.0 (rust-lang/cargo#17060) - chore(deps): update compatible (rust-lang/cargo#17057) - fix(util): constant type for Redox OS (rust-lang/cargo#17064) - chore(deps): update crate-ci/typos action to v1.47.0 (rust-lang/cargo#17059) - chore(deps): update embarkstudios/cargo-deny-action action to v2.0.20 (rust-lang/cargo#17058) - chore(deps): update cargo-semver-checks to v0.48.0 (rust-lang/cargo#17054) - chore: bump to 0.99.0; update changelog (rust-lang/cargo#17049) - Bump cargo-util-schemas to 0.14.2 (rust-lang/cargo#17048) - feat: Add edition for scripts anytime we mutate the manifest (rust-lang/cargo#17038) - docs: clarify on crate removal post RFC 3660 (rust-lang/cargo#17036) - feat: Add --output-format=json to cargo doc as an unstable option (rust-lang/cargo#17025) - feat(diag): Add the 'cargo::default' group (rust-lang/cargo#17033) - fix(add): Ensure erros are lower case (rust-lang/cargo#17037) - fix(diag): Report summaries for unused_deps (rust-lang/cargo#17034)
pull Bot
pushed a commit
to xtqqczze/rust-lang-rustc-dev-guide
that referenced
this pull request
Jun 4, 2026
Update cargo submodule 14 commits in fbb61be30e5f9ac3a6ad58e56a5c0f5db2d2b3ef..0b1123a48825309b697312b44fdb64b3df00c958 2026-05-26 15:08:03 +0000 to 2026-06-01 21:20:28 +0000 - chore(deps): update rust crate git2 to 0.21.0 (rust-lang/cargo#17060) - chore(deps): update compatible (rust-lang/cargo#17057) - fix(util): constant type for Redox OS (rust-lang/cargo#17064) - chore(deps): update crate-ci/typos action to v1.47.0 (rust-lang/cargo#17059) - chore(deps): update embarkstudios/cargo-deny-action action to v2.0.20 (rust-lang/cargo#17058) - chore(deps): update cargo-semver-checks to v0.48.0 (rust-lang/cargo#17054) - chore: bump to 0.99.0; update changelog (rust-lang/cargo#17049) - Bump cargo-util-schemas to 0.14.2 (rust-lang/cargo#17048) - feat: Add edition for scripts anytime we mutate the manifest (rust-lang/cargo#17038) - docs: clarify on crate removal post RFC 3660 (rust-lang/cargo#17036) - feat: Add --output-format=json to cargo doc as an unstable option (rust-lang/cargo#17025) - feat(diag): Add the 'cargo::default' group (rust-lang/cargo#17033) - fix(add): Ensure erros are lower case (rust-lang/cargo#17037) - fix(diag): Report summaries for unused_deps (rust-lang/cargo#17034)
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.
What does this PR try to resolve?
This is an experiment in finding a middle ground between two opposite perspectives
cargo fixresolves the no-edition warning by setting itcargoautomatically injects the edition whenever running a cargo scriptThis is instead "if we're already doing edits, we might as well inject the edition". This is still limited because (1) people or IDEs can do direct edits and (2)
cargo add -M script.rs serdeis a big more cumbersome thancargo add serde.We could possibly take this a step further to "all mutations" and include
cargo updateandcargo generate-lockfile.This does not include a "pinning" status message at this time.
How to test and review this PR?