Skip to content

Commit 97cc78e

Browse files
committed
feat(unstable): new unstable feature patch-files
Since `[patch]` section exists also in config, so have it inboth cargo-features and -Z flag.
1 parent a7917fd commit 97cc78e

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

Diff for: src/cargo/core/features.rs

+5
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,9 @@ features! {
513513

514514
/// Allow multiple packages to participate in the same API namespace
515515
(unstable, open_namespaces, "", "reference/unstable.html#open-namespaces"),
516+
517+
/// Allow patching dependencies with patch files.
518+
(unstable, patch_files, "", "reference/unstable.html#patch-files"),
516519
}
517520

518521
/// Status and metadata for a single unstable feature.
@@ -775,6 +778,7 @@ unstable_cli_options!(
775778
next_lockfile_bump: bool,
776779
no_index_update: bool = ("Do not update the registry index even if the cache is outdated"),
777780
panic_abort_tests: bool = ("Enable support to run tests with -Cpanic=abort"),
781+
patch_files: bool = ("Allow patching dependencies with patch files"),
778782
profile_rustflags: bool = ("Enable the `rustflags` option in profiles in .cargo/config.toml file"),
779783
public_dependency: bool = ("Respect a dependency's `public` field in Cargo.toml to control public/private dependencies"),
780784
publish_timeout: bool = ("Enable the `publish.timeout` key in .cargo/config.toml file"),
@@ -1277,6 +1281,7 @@ impl CliUnstable {
12771281
"mtime-on-use" => self.mtime_on_use = parse_empty(k, v)?,
12781282
"no-index-update" => self.no_index_update = parse_empty(k, v)?,
12791283
"panic-abort-tests" => self.panic_abort_tests = parse_empty(k, v)?,
1284+
"patch-files" => self.patch_files = parse_empty(k, v)?,
12801285
"public-dependency" => self.public_dependency = parse_empty(k, v)?,
12811286
"profile-rustflags" => self.profile_rustflags = parse_empty(k, v)?,
12821287
"trim-paths" => self.trim_paths = parse_empty(k, v)?,

Diff for: tests/testsuite/cargo/z_help/stdout.term.svg

+17-15
Loading

0 commit comments

Comments
 (0)