Repository navigation
feat(prerelease): support [patch] with -Zprerelease - #17613
Merged
Merged
Conversation
With `-Zprerelease`, use pre-release matching when matching the version requirment from the `[patch]` entry's manifest. We don't touch `[replace]` as its requirement is always exact from `[replace]` itself.
Collaborator
|
r? @Muscraft rustbot has assigned @Muscraft. Use Why was this reviewer chosen?The reviewer was selected based on:
|
epage
reviewed
Oct 20, 2026
epage
reviewed
Oct 20, 2026
Comment on lines
+1230
to
+1231
| assert_e2e().eq( | ||
| &p.read_lockfile(), |
Contributor
There was a problem hiding this comment.
Aside: I wonder if we should add specialized p.assert_file("Cargo.lock", str![]); calls to simplify these patterns
epage
approved these changes
Oct 20, 2026
1 of 3 tasks
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Oct 21, 2026
Update cargo submodule 12 commits in 3960fa69bb617e3d93c4ddc087c1b32bf12ad907..15be64aa0859b5c36f7a86d52f7aa0db44ba4d84 2026-10-12 19:29:05 +0000 to 2026-10-20 16:03:21 +0000 - feat(prerelease): support `[patch]` with `-Zprerelease` (rust-lang/cargo#17613) - chore(gh): Overhaul PR template (rust-lang/cargo#17612) - fix(util-schemas): compile out the file-path hint where url can't build it (rust-lang/cargo#17600) - feat(build-std): Add build.build-std.when and crates config keys (rust-lang/cargo#17602) - refactor(confg): Create a config abstraction (rust-lang/cargo#17606) - fix(config): Apply dotted tuple support for rustflags (rust-lang/cargo#17594) - Feat: Shell completion show all the packages having the feature (rust-lang/cargo#17574) - fix(config): Don't load registry config from credentials.toml (rust-lang/cargo#17599) - fix(fingerprint): choose a stable path when source mtimes tie (rust-lang/cargo#17521) - Update gix crates to address CVE-2026-82248, CVE-2026-82249, and CVE-2026-82250, and update git utils.rs to accommodate gix-url v0.38.0. (rust-lang/cargo#17484) - fix: check crate type when pruning `-L` paths (rust-lang/cargo#17589) - refactor(parser): Simplify dep source validation (rust-lang/cargo#17506) r? ghost
opensource-fork-sync Bot
pushed a commit
to cla7aye15I4nd/opensource-rust-lang__cargo
that referenced
this pull request
Oct 21, 2026
### What does this PR try to resolve? As requested in <rust-lang#17613 (comment)> ### Notes to reviewers --- 🤖 LLM involvement: This is a trivial test change, so most of them are LLM assisted except the doc ocmment.
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Oct 22, 2026
Update cargo submodule 12 commits in 3960fa69bb617e3d93c4ddc087c1b32bf12ad907..15be64aa0859b5c36f7a86d52f7aa0db44ba4d84 2026-10-12 19:29:05 +0000 to 2026-10-20 16:03:21 +0000 - feat(prerelease): support `[patch]` with `-Zprerelease` (rust-lang/cargo#17613) - chore(gh): Overhaul PR template (rust-lang/cargo#17612) - fix(util-schemas): compile out the file-path hint where url can't build it (rust-lang/cargo#17600) - feat(build-std): Add build.build-std.when and crates config keys (rust-lang/cargo#17602) - refactor(confg): Create a config abstraction (rust-lang/cargo#17606) - fix(config): Apply dotted tuple support for rustflags (rust-lang/cargo#17594) - Feat: Shell completion show all the packages having the feature (rust-lang/cargo#17574) - fix(config): Don't load registry config from credentials.toml (rust-lang/cargo#17599) - fix(fingerprint): choose a stable path when source mtimes tie (rust-lang/cargo#17521) - Update gix crates to address CVE-2026-82248, CVE-2026-82249, and CVE-2026-82250, and update git utils.rs to accommodate gix-url v0.38.0. (rust-lang/cargo#17484) - fix: check crate type when pruning `-L` paths (rust-lang/cargo#17589) - refactor(parser): Simplify dep source validation (rust-lang/cargo#17506) r? ghost
WhySoBad
pushed a commit
to WhySoBad/miri
that referenced
this pull request
Oct 23, 2026
Update cargo submodule 12 commits in 3960fa69bb617e3d93c4ddc087c1b32bf12ad907..15be64aa0859b5c36f7a86d52f7aa0db44ba4d84 2026-10-12 19:29:05 +0000 to 2026-10-20 16:03:21 +0000 - feat(prerelease): support `[patch]` with `-Zprerelease` (rust-lang/cargo#17613) - chore(gh): Overhaul PR template (rust-lang/cargo#17612) - fix(util-schemas): compile out the file-path hint where url can't build it (rust-lang/cargo#17600) - feat(build-std): Add build.build-std.when and crates config keys (rust-lang/cargo#17602) - refactor(confg): Create a config abstraction (rust-lang/cargo#17606) - fix(config): Apply dotted tuple support for rustflags (rust-lang/cargo#17594) - Feat: Shell completion show all the packages having the feature (rust-lang/cargo#17574) - fix(config): Don't load registry config from credentials.toml (rust-lang/cargo#17599) - fix(fingerprint): choose a stable path when source mtimes tie (rust-lang/cargo#17521) - Update gix crates to address CVE-2026-82248, CVE-2026-82249, and CVE-2026-82250, and update git utils.rs to accommodate gix-url v0.38.0. (rust-lang/cargo#17484) - fix: check crate type when pruning `-L` paths (rust-lang/cargo#17589) - refactor(parser): Simplify dep source validation (rust-lang/cargo#17506) r? ghost
github-actions Bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Oct 25, 2026
Update cargo submodule 12 commits in 3960fa69bb617e3d93c4ddc087c1b32bf12ad907..15be64aa0859b5c36f7a86d52f7aa0db44ba4d84 2026-10-12 19:29:05 +0000 to 2026-10-20 16:03:21 +0000 - feat(prerelease): support `[patch]` with `-Zprerelease` (rust-lang/cargo#17613) - chore(gh): Overhaul PR template (rust-lang/cargo#17612) - fix(util-schemas): compile out the file-path hint where url can't build it (rust-lang/cargo#17600) - feat(build-std): Add build.build-std.when and crates config keys (rust-lang/cargo#17602) - refactor(confg): Create a config abstraction (rust-lang/cargo#17606) - fix(config): Apply dotted tuple support for rustflags (rust-lang/cargo#17594) - Feat: Shell completion show all the packages having the feature (rust-lang/cargo#17574) - fix(config): Don't load registry config from credentials.toml (rust-lang/cargo#17599) - fix(fingerprint): choose a stable path when source mtimes tie (rust-lang/cargo#17521) - Update gix crates to address CVE-2026-82248, CVE-2026-82249, and CVE-2026-82250, and update git utils.rs to accommodate gix-url v0.38.0. (rust-lang/cargo#17484) - fix: check crate type when pruning `-L` paths (rust-lang/cargo#17589) - refactor(parser): Simplify dep source validation (rust-lang/cargo#17506) r? ghost
github-actions Bot
pushed a commit
to rust-lang/stdarch
that referenced
this pull request
Oct 26, 2026
Update cargo submodule 12 commits in 3960fa69bb617e3d93c4ddc087c1b32bf12ad907..15be64aa0859b5c36f7a86d52f7aa0db44ba4d84 2026-10-12 19:29:05 +0000 to 2026-10-20 16:03:21 +0000 - feat(prerelease): support `[patch]` with `-Zprerelease` (rust-lang/cargo#17613) - chore(gh): Overhaul PR template (rust-lang/cargo#17612) - fix(util-schemas): compile out the file-path hint where url can't build it (rust-lang/cargo#17600) - feat(build-std): Add build.build-std.when and crates config keys (rust-lang/cargo#17602) - refactor(confg): Create a config abstraction (rust-lang/cargo#17606) - fix(config): Apply dotted tuple support for rustflags (rust-lang/cargo#17594) - Feat: Shell completion show all the packages having the feature (rust-lang/cargo#17574) - fix(config): Don't load registry config from credentials.toml (rust-lang/cargo#17599) - fix(fingerprint): choose a stable path when source mtimes tie (rust-lang/cargo#17521) - Update gix crates to address CVE-2026-82248, CVE-2026-82249, and CVE-2026-82250, and update git utils.rs to accommodate gix-url v0.38.0. (rust-lang/cargo#17484) - fix: check crate type when pruning `-L` paths (rust-lang/cargo#17589) - refactor(parser): Simplify dep source validation (rust-lang/cargo#17506) r? ghost
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?
With
-Zprerelease,use pre-release matching when matching the version requirment
from the
[patch]entry's manifest.cc #13290
Notes to reviewers
I planned to do this when I did #17464.
This is the remaining consumption side that didn't respect locked/selected pre-releases.
I feel like they should be shipped together with #17464 when stabilized, otherwise it is pretty inconsistent.
Also, we don't touch
[replace]as its requirement is always exact from[replace]itself.🤖 LLM involvement: Tests are a mix of LLM generated and hand-tweaked.