diff --git a/src/cargo/core/features.rs b/src/cargo/core/features.rs
index 1d5c78f8d99..d2f59ea86a5 100644
--- a/src/cargo/core/features.rs
+++ b/src/cargo/core/features.rs
@@ -870,6 +870,7 @@ unstable_cli_options!(
#[serde(deserialize_with = "deserialize_gitoxide_features")]
gitoxide: Option = ("Use gitoxide for the given git interactions, or all of them if no argument is given"),
host_config: bool = ("Enable the `[host]` section in the .cargo/config.toml file"),
+ lockfile_path: bool = ("Enable the `resolver.lockfile-path` config option"),
minimal_versions: bool = ("Resolve minimal dependency versions instead of maximum"),
msrv_policy: bool = ("Enable rust-version aware policy within cargo"),
mtime_on_use: bool = ("Configure Cargo to update the mtime of used files"),
@@ -1408,6 +1409,7 @@ impl CliUnstable {
)?
}
"host-config" => self.host_config = parse_empty(k, v)?,
+ "lockfile-path" => self.lockfile_path = parse_empty(k, v)?,
"next-lockfile-bump" => self.next_lockfile_bump = parse_empty(k, v)?,
"minimal-versions" => self.minimal_versions = parse_empty(k, v)?,
"msrv-policy" => self.msrv_policy = parse_empty(k, v)?,
diff --git a/src/cargo/core/workspace.rs b/src/cargo/core/workspace.rs
index d72a55a4255..0de5aad4f2e 100644
--- a/src/cargo/core/workspace.rs
+++ b/src/cargo/core/workspace.rs
@@ -26,7 +26,9 @@ use crate::lints::rules::blanket_hint_mostly_unused;
use crate::lints::rules::check_im_a_teapot;
use crate::lints::rules::implicit_minimum_version_req;
use crate::ops;
+use crate::ops::lockfile::LOCKFILE_NAME;
use crate::sources::{CRATES_IO_INDEX, CRATES_IO_REGISTRY, PathSource, SourceConfigMap};
+use crate::util::context;
use crate::util::context::{FeatureUnification, Value};
use crate::util::edit_distance;
use crate::util::errors::{CargoResult, ManifestError};
@@ -354,6 +356,49 @@ impl<'gctx> Workspace<'gctx> {
.warn("ignoring `resolver.feature-unification` without `-Zfeature-unification`")?;
};
+ if let Some(lockfile_path) = config.lockfile_path {
+ if self.gctx().cli_unstable().lockfile_path {
+ // Reserve the ability to add templates in the future.
+ let replacements: [(&str, &str); 0] = [];
+ let path = lockfile_path
+ .resolve_templated_path(self.gctx(), replacements)
+ .map_err(|e| match e {
+ context::ResolveTemplateError::UnexpectedVariable {
+ variable,
+ raw_template,
+ } => {
+ anyhow!(
+ "unexpected variable `{variable}` in resolver.lockfile-path `{raw_template}`"
+ )
+ }
+ context::ResolveTemplateError::UnexpectedBracket { bracket_type, raw_template } => {
+ let (btype, literal) = match bracket_type {
+ context::BracketType::Opening => ("opening", "{"),
+ context::BracketType::Closing => ("closing", "}"),
+ };
+
+ anyhow!(
+ "unexpected {btype} bracket `{literal}` in build.build-dir path `{raw_template}`"
+ )
+ }
+ })?;
+ if !path.ends_with(LOCKFILE_NAME) {
+ bail!("the `resolver.lockfile-path` must be a path to a {LOCKFILE_NAME} file");
+ }
+ if path.is_dir() {
+ bail!(
+ "`resolver.lockfile-path` `{}` is a directory but expected a file",
+ path.display()
+ );
+ }
+ self.requested_lockfile_path = Some(path);
+ } else {
+ self.gctx().shell().warn(
+ "ignoring `resolver.lockfile-path`, pass `-Zlockfile-path` to enable it",
+ )?;
+ }
+ }
+
Ok(())
}
@@ -690,6 +735,7 @@ impl<'gctx> Workspace<'gctx> {
}
}
+ // NOTE: may be removed once the deprecated `--lockfile-path` CLI flag is removed
pub fn set_requested_lockfile_path(&mut self, path: Option) {
self.requested_lockfile_path = path;
}
diff --git a/src/cargo/util/command_prelude.rs b/src/cargo/util/command_prelude.rs
index 426a7420fec..58b98f1cbed 100644
--- a/src/cargo/util/command_prelude.rs
+++ b/src/cargo/util/command_prelude.rs
@@ -657,7 +657,15 @@ pub trait ArgMatchesExt {
if gctx.cli_unstable().avoid_dev_deps {
ws.set_require_optional_deps(false);
}
- ws.set_requested_lockfile_path(lockfile_path);
+ if lockfile_path.is_some() {
+ if ws.requested_lockfile_path().is_some() {
+ gctx.shell().warn(
+ "`--lockfile-path` is ignored because `resolver.lockfile-path` is set in config",
+ )?;
+ } else {
+ ws.set_requested_lockfile_path(lockfile_path);
+ }
+ }
Ok(ws)
}
@@ -1123,6 +1131,11 @@ pub fn lockfile_path(
)
}
+ gctx.shell().warn(
+ "the `--lockfile-path` flag is deprecated and will be removed in a future release, \
+ use `resolver.lockfile-path` config instead",
+ )?;
+
return Ok(Some(path));
}
diff --git a/src/cargo/util/context/mod.rs b/src/cargo/util/context/mod.rs
index 02024c8ad58..e3d30390eb5 100644
--- a/src/cargo/util/context/mod.rs
+++ b/src/cargo/util/context/mod.rs
@@ -122,7 +122,10 @@ pub use config_value::ConfigValue;
use config_value::is_nonmergeable_list;
mod path;
-pub use path::{ConfigRelativePath, PathAndArgs};
+pub use path::BracketType;
+pub use path::ConfigRelativePath;
+pub use path::PathAndArgs;
+pub use path::ResolveTemplateError;
mod target;
pub use target::{TargetCfgConfig, TargetConfig};
diff --git a/src/cargo/util/context/schema.rs b/src/cargo/util/context/schema.rs
index 2dcd9ef6643..ca826892e26 100644
--- a/src/cargo/util/context/schema.rs
+++ b/src/cargo/util/context/schema.rs
@@ -307,12 +307,14 @@ impl BuildTargetConfig {
/// [resolver]
/// incompatible-rust-versions = "fallback"
/// feature-unification = "workspace"
+/// lockfile-path = "my/Cargo.lock"
/// ```
#[derive(Debug, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct CargoResolverConfig {
pub incompatible_rust_versions: Option,
pub feature_unification: Option,
+ pub lockfile_path: Option,
}
#[derive(Debug, Deserialize, PartialEq, Eq)]
diff --git a/src/doc/man/cargo-add.md b/src/doc/man/cargo-add.md
index 555c96b064e..17ae00b77c6 100644
--- a/src/doc/man/cargo-add.md
+++ b/src/doc/man/cargo-add.md
@@ -167,7 +167,6 @@ Add dependencies to only the specified package.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-bench.md b/src/doc/man/cargo-bench.md
index fa3d39c6555..a1f5028e3ba 100644
--- a/src/doc/man/cargo-bench.md
+++ b/src/doc/man/cargo-bench.md
@@ -147,7 +147,6 @@ passing `--no-capture` to the benchmark binaries:
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-build.md b/src/doc/man/cargo-build.md
index a1784617ae9..2a514ac0fcf 100644
--- a/src/doc/man/cargo-build.md
+++ b/src/doc/man/cargo-build.md
@@ -79,7 +79,6 @@ See for more information.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-check.md b/src/doc/man/cargo-check.md
index 0a846c4e92f..d2386436996 100644
--- a/src/doc/man/cargo-check.md
+++ b/src/doc/man/cargo-check.md
@@ -71,7 +71,6 @@ they have `required-features` that are missing.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-clean.md b/src/doc/man/cargo-clean.md
index d5c5b6c7cfd..05e34602e1c 100644
--- a/src/doc/man/cargo-clean.md
+++ b/src/doc/man/cargo-clean.md
@@ -79,7 +79,6 @@ Remove all artifacts in the directory with the given profile name.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-doc.md b/src/doc/man/cargo-doc.md
index a176ea1c9b9..762ce67a3a6 100644
--- a/src/doc/man/cargo-doc.md
+++ b/src/doc/man/cargo-doc.md
@@ -107,7 +107,6 @@ and supports common Unix glob patterns.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-fetch.md b/src/doc/man/cargo-fetch.md
index 22a833f81bf..dc85c9ac9f1 100644
--- a/src/doc/man/cargo-fetch.md
+++ b/src/doc/man/cargo-fetch.md
@@ -49,7 +49,6 @@ you plan to use Cargo without a network with the `--offline` flag.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-fix.md b/src/doc/man/cargo-fix.md
index efb116d69a8..67011f88425 100644
--- a/src/doc/man/cargo-fix.md
+++ b/src/doc/man/cargo-fix.md
@@ -151,7 +151,6 @@ When no target selection options are given, `cargo fix` will fix all targets
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-generate-lockfile.md b/src/doc/man/cargo-generate-lockfile.md
index cd71885edde..ed027d32109 100644
--- a/src/doc/man/cargo-generate-lockfile.md
+++ b/src/doc/man/cargo-generate-lockfile.md
@@ -43,7 +43,6 @@ This is a best-effort filter on allowed packages, including:
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-metadata.md b/src/doc/man/cargo-metadata.md
index e5e9e6caaca..21bda47752c 100644
--- a/src/doc/man/cargo-metadata.md
+++ b/src/doc/man/cargo-metadata.md
@@ -387,7 +387,6 @@ reproduction of the information within `Cargo.toml`.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-package.md b/src/doc/man/cargo-package.md
index 217f41632df..30553ddbadd 100644
--- a/src/doc/man/cargo-package.md
+++ b/src/doc/man/cargo-package.md
@@ -182,7 +182,6 @@ Valid output formats:
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
diff --git a/src/doc/man/cargo-pkgid.md b/src/doc/man/cargo-pkgid.md
index 28a6ea13808..f531f255235 100644
--- a/src/doc/man/cargo-pkgid.md
+++ b/src/doc/man/cargo-pkgid.md
@@ -63,7 +63,6 @@ Get the package ID for the given package instead of the current package.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
diff --git a/src/doc/man/cargo-publish.md b/src/doc/man/cargo-publish.md
index c9f753b671c..eb12d6a8c66 100644
--- a/src/doc/man/cargo-publish.md
+++ b/src/doc/man/cargo-publish.md
@@ -89,7 +89,6 @@ which defaults to `crates-io`.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
diff --git a/src/doc/man/cargo-remove.md b/src/doc/man/cargo-remove.md
index 87bacb5b491..e0d7c360ea6 100644
--- a/src/doc/man/cargo-remove.md
+++ b/src/doc/man/cargo-remove.md
@@ -60,7 +60,6 @@ Don't actually write to the manifest.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
### Package Selection
diff --git a/src/doc/man/cargo-run.md b/src/doc/man/cargo-run.md
index c5d37790e5d..a1455eb8c9b 100644
--- a/src/doc/man/cargo-run.md
+++ b/src/doc/man/cargo-run.md
@@ -87,7 +87,6 @@ Run the specified example.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
diff --git a/src/doc/man/cargo-rustc.md b/src/doc/man/cargo-rustc.md
index 15238ea09d3..b6c73ac666f 100644
--- a/src/doc/man/cargo-rustc.md
+++ b/src/doc/man/cargo-rustc.md
@@ -112,7 +112,6 @@ This flag only works when building a `lib` or `example` library target.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
diff --git a/src/doc/man/cargo-rustdoc.md b/src/doc/man/cargo-rustdoc.md
index 5a354d2d1d6..c2fb1beea10 100644
--- a/src/doc/man/cargo-rustdoc.md
+++ b/src/doc/man/cargo-rustdoc.md
@@ -94,7 +94,6 @@ if its name is the same as the lib target. Binaries are skipped if they have
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-options-common }}
diff --git a/src/doc/man/cargo-test.md b/src/doc/man/cargo-test.md
index 9e0271e12eb..1f54838f308 100644
--- a/src/doc/man/cargo-test.md
+++ b/src/doc/man/cargo-test.md
@@ -172,7 +172,6 @@ results readable. Test output can be recovered (e.g., for debugging) by passing
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
diff --git a/src/doc/man/cargo-tree.md b/src/doc/man/cargo-tree.md
index 9738fa36b18..70e206f720e 100644
--- a/src/doc/man/cargo-tree.md
+++ b/src/doc/man/cargo-tree.md
@@ -189,7 +189,6 @@ Sets how each line is displayed. The _prefix_ value can be one of:
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
{{> section-features }}
diff --git a/src/doc/man/cargo-update.md b/src/doc/man/cargo-update.md
index 8e7a9be5a76..f42ffd8a351 100644
--- a/src/doc/man/cargo-update.md
+++ b/src/doc/man/cargo-update.md
@@ -97,7 +97,6 @@ Displays what would be updated, but doesn't actually write the lockfile.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
diff --git a/src/doc/man/cargo-vendor.md b/src/doc/man/cargo-vendor.md
index 464437b044f..4455667f4be 100644
--- a/src/doc/man/cargo-vendor.md
+++ b/src/doc/man/cargo-vendor.md
@@ -66,7 +66,6 @@ only a subset of the packages have changed.
{{> options-locked }}
-{{> options-lockfile-path }}
{{/options}}
diff --git a/src/doc/man/generated_txt/cargo-add.txt b/src/doc/man/generated_txt/cargo-add.txt
index 70757246ec2..b65a80c7ad1 100644
--- a/src/doc/man/generated_txt/cargo-add.txt
+++ b/src/doc/man/generated_txt/cargo-add.txt
@@ -205,21 +205,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-bench.txt b/src/doc/man/generated_txt/cargo-bench.txt
index f1fa449452a..089ed26453a 100644
--- a/src/doc/man/generated_txt/cargo-bench.txt
+++ b/src/doc/man/generated_txt/cargo-bench.txt
@@ -373,21 +373,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-build.txt b/src/doc/man/generated_txt/cargo-build.txt
index acce0baf363..027ddf2c585 100644
--- a/src/doc/man/generated_txt/cargo-build.txt
+++ b/src/doc/man/generated_txt/cargo-build.txt
@@ -297,21 +297,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-check.txt b/src/doc/man/generated_txt/cargo-check.txt
index b9397423540..31218f8b6a6 100644
--- a/src/doc/man/generated_txt/cargo-check.txt
+++ b/src/doc/man/generated_txt/cargo-check.txt
@@ -291,21 +291,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-clean.txt b/src/doc/man/generated_txt/cargo-clean.txt
index b90b983129e..a25c8f2a8ef 100644
--- a/src/doc/man/generated_txt/cargo-clean.txt
+++ b/src/doc/man/generated_txt/cargo-clean.txt
@@ -139,21 +139,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-doc.txt b/src/doc/man/generated_txt/cargo-doc.txt
index 48396045386..57d0cb89a08 100644
--- a/src/doc/man/generated_txt/cargo-doc.txt
+++ b/src/doc/man/generated_txt/cargo-doc.txt
@@ -266,21 +266,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-fetch.txt b/src/doc/man/generated_txt/cargo-fetch.txt
index ac8ea1f8f5a..0ab31bfef45 100644
--- a/src/doc/man/generated_txt/cargo-fetch.txt
+++ b/src/doc/man/generated_txt/cargo-fetch.txt
@@ -115,21 +115,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-fix.txt b/src/doc/man/generated_txt/cargo-fix.txt
index 2f34983a05f..11c3b361e5c 100644
--- a/src/doc/man/generated_txt/cargo-fix.txt
+++ b/src/doc/man/generated_txt/cargo-fix.txt
@@ -365,21 +365,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-generate-lockfile.txt b/src/doc/man/generated_txt/cargo-generate-lockfile.txt
index b9861f1402f..61a5c182fc2 100644
--- a/src/doc/man/generated_txt/cargo-generate-lockfile.txt
+++ b/src/doc/man/generated_txt/cargo-generate-lockfile.txt
@@ -93,21 +93,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-metadata.txt b/src/doc/man/generated_txt/cargo-metadata.txt
index e06d8c1d660..82eb6e2aaef 100644
--- a/src/doc/man/generated_txt/cargo-metadata.txt
+++ b/src/doc/man/generated_txt/cargo-metadata.txt
@@ -447,21 +447,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-package.txt b/src/doc/man/generated_txt/cargo-package.txt
index 9ee3f8720b7..e0a636a7c62 100644
--- a/src/doc/man/generated_txt/cargo-package.txt
+++ b/src/doc/man/generated_txt/cargo-package.txt
@@ -281,21 +281,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Miscellaneous Options
-j N, --jobs N
Number of parallel jobs to run. May also be specified with the
diff --git a/src/doc/man/generated_txt/cargo-pkgid.txt b/src/doc/man/generated_txt/cargo-pkgid.txt
index e36d1408301..3123dcad20b 100644
--- a/src/doc/man/generated_txt/cargo-pkgid.txt
+++ b/src/doc/man/generated_txt/cargo-pkgid.txt
@@ -116,21 +116,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-publish.txt b/src/doc/man/generated_txt/cargo-publish.txt
index 3ea494a90cb..328f0d3cc61 100644
--- a/src/doc/man/generated_txt/cargo-publish.txt
+++ b/src/doc/man/generated_txt/cargo-publish.txt
@@ -194,21 +194,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Miscellaneous Options
-j N, --jobs N
Number of parallel jobs to run. May also be specified with the
diff --git a/src/doc/man/generated_txt/cargo-remove.txt b/src/doc/man/generated_txt/cargo-remove.txt
index 4f5c4a3d394..9d8c14afcc9 100644
--- a/src/doc/man/generated_txt/cargo-remove.txt
+++ b/src/doc/man/generated_txt/cargo-remove.txt
@@ -93,21 +93,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Package Selection
-p spec…, --package spec…
Package to remove from.
diff --git a/src/doc/man/generated_txt/cargo-run.txt b/src/doc/man/generated_txt/cargo-run.txt
index dcac45f9b28..e7d0708eb6d 100644
--- a/src/doc/man/generated_txt/cargo-run.txt
+++ b/src/doc/man/generated_txt/cargo-run.txt
@@ -211,21 +211,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-rustc.txt b/src/doc/man/generated_txt/cargo-rustc.txt
index 6f7dad5b0a1..a01cc112b93 100644
--- a/src/doc/man/generated_txt/cargo-rustc.txt
+++ b/src/doc/man/generated_txt/cargo-rustc.txt
@@ -309,21 +309,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-rustdoc.txt b/src/doc/man/generated_txt/cargo-rustdoc.txt
index ccfe21bfde9..ab78e282046 100644
--- a/src/doc/man/generated_txt/cargo-rustdoc.txt
+++ b/src/doc/man/generated_txt/cargo-rustdoc.txt
@@ -278,21 +278,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-test.txt b/src/doc/man/generated_txt/cargo-test.txt
index ae3a6b66b45..00449b09541 100644
--- a/src/doc/man/generated_txt/cargo-test.txt
+++ b/src/doc/man/generated_txt/cargo-test.txt
@@ -399,21 +399,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-tree.txt b/src/doc/man/generated_txt/cargo-tree.txt
index 03ae72d12d9..8ac8207797a 100644
--- a/src/doc/man/generated_txt/cargo-tree.txt
+++ b/src/doc/man/generated_txt/cargo-tree.txt
@@ -246,21 +246,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Feature Selection
The feature flags allow you to control which features are enabled. When
no feature options are given, the default feature is activated for every
diff --git a/src/doc/man/generated_txt/cargo-update.txt b/src/doc/man/generated_txt/cargo-update.txt
index 2c01e52a7f0..1e3500481ad 100644
--- a/src/doc/man/generated_txt/cargo-update.txt
+++ b/src/doc/man/generated_txt/cargo-update.txt
@@ -140,21 +140,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
diff --git a/src/doc/man/generated_txt/cargo-vendor.txt b/src/doc/man/generated_txt/cargo-vendor.txt
index 45b5f876a6f..771e75326d6 100644
--- a/src/doc/man/generated_txt/cargo-vendor.txt
+++ b/src/doc/man/generated_txt/cargo-vendor.txt
@@ -85,21 +85,6 @@ OPTIONS
--frozen
Equivalent to specifying both --locked and --offline.
- --lockfile-path PATH
- Changes the path of the lockfile from the default
- (/Cargo.lock) to PATH. PATH must end with Cargo.lock
- (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that
- providing --lockfile-path will ignore existing lockfile at the
- default path, and instead will either use the lockfile from PATH, or
- write a new lockfile into the provided PATH if it doesn’t exist.
- This flag can be used to run most commands in read-only directories,
- writing lockfile into the provided PATH.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #14421
- ).
-
Display Options
-v, --verbose
Use verbose output. May be specified twice for “very verbose”
diff --git a/src/doc/man/includes/options-lockfile-path.md b/src/doc/man/includes/options-lockfile-path.md
deleted file mode 100644
index 8bf507f1fd8..00000000000
--- a/src/doc/man/includes/options-lockfile-path.md
+++ /dev/null
@@ -1,12 +0,0 @@
-{{#option "`--lockfile-path` _PATH_"}}
-Changes the path of the lockfile from the default (`/Cargo.lock`) to _PATH_. _PATH_ must end with
-`Cargo.lock` (e.g. `--lockfile-path /tmp/temporary-lockfile/Cargo.lock`). Note that providing
-`--lockfile-path` will ignore existing lockfile at the default path, and instead will
-either use the lockfile from _PATH_, or write a new lockfile into the provided _PATH_ if it doesn't exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided _PATH_.
-
-This option is only available on the [nightly
-channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) and
-requires the `-Z unstable-options` flag to enable (see
-[#14421](https://github.com/rust-lang/cargo/issues/14421)).
-{{/option}}
\ No newline at end of file
diff --git a/src/doc/src/commands/cargo-add.md b/src/doc/src/commands/cargo-add.md
index 976c6ac1009..1a22d87efdf 100644
--- a/src/doc/src/commands/cargo-add.md
+++ b/src/doc/src/commands/cargo-add.md
@@ -249,18 +249,6 @@ offline.
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
-
-
### Common Options
diff --git a/src/doc/src/commands/cargo-fetch.md b/src/doc/src/commands/cargo-fetch.md
index b519199175a..279558343b0 100644
--- a/src/doc/src/commands/cargo-fetch.md
+++ b/src/doc/src/commands/cargo-fetch.md
@@ -118,18 +118,6 @@ if there might be a newer version as indicated in the local copy of the index.
-
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with
-Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing
---lockfile-path will ignore existing lockfile at the default path, and instead will
-either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist.
-This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.
-
This option is only available on the nightly
-channel and
-requires the -Z unstable-options flag to enable (see
-#14421).
-
-
diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md
index 637fe27d7c3..76e595281dd 100644
--- a/src/doc/src/reference/unstable.md
+++ b/src/doc/src/reference/unstable.md
@@ -1760,21 +1760,37 @@ path bases without compatibility issues (as existing uses will shadow the
built-in name).
## lockfile-path
+
* Original Issue: [#5707](https://github.com/rust-lang/cargo/issues/5707)
* Tracking Issue: [#14421](https://github.com/rust-lang/cargo/issues/14421)
-This feature allows you to specify the path of lockfile Cargo.lock.
+The `-Zlockfile-path` flag enables the `resolver.lockfile-path` configuration option,
+which allows you to specify the path of the lockfile `Cargo.lock`.
+
By default, lockfile is written into `/Cargo.lock`.
-However, when sources are stored in read-only directory, most of the cargo commands
-would fail, trying to write a lockfile. The `--lockfile-path`
-flag makes it easier to work with readonly sources.
-Note, that currently path must end with `Cargo.lock`. Meaning, if you want to use
-this feature in multiple projects, lockfiles should be stored in different directories.
-Example:
+However, when sources are stored in read-only directory,
+most of the cargo commands would fail when trying to write a lockfile.
+This configuration makes it easier to work with readonly sources.
-```sh
-cargo +nightly metadata --lockfile-path=$LOCKFILES_ROOT/my-project/Cargo.lock -Z unstable-options
-```
+Note, that currently path must end with `Cargo.lock`.
+If you want to use this feature in multiple projects,
+lockfiles should be stored in different directories.
+
+### Documentation updates
+
+*as a new `resolver.lockfile-path` entry in config.md*
+
+#### `resolver.lockfile-path`
+
+* Type: string (path)
+* Default: `/Cargo.lock`
+* Environment: `CARGO_RESOLVER_LOCKFILE_PATH`
+
+Specifies the path to the lockfile.
+By default, the lockfile is written to `/Cargo.lock`.
+This option is useful when working with read-only source directories.
+
+The path must end with `Cargo.lock`.
## native-completions
* Original Issue: [#6645](https://github.com/rust-lang/cargo/issues/6645)
diff --git a/src/etc/man/cargo-add.1 b/src/etc/man/cargo-add.1
index 680642df73b..84a3d528dfd 100644
--- a/src/etc/man/cargo-add.1
+++ b/src/etc/man/cargo-add.1
@@ -261,20 +261,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-bench.1 b/src/etc/man/cargo-bench.1
index c447bb058e9..998c747ceca 100644
--- a/src/etc/man/cargo-bench.1
+++ b/src/etc/man/cargo-bench.1
@@ -457,20 +457,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-build.1 b/src/etc/man/cargo-build.1
index a256bcb6d42..c90c2200ead 100644
--- a/src/etc/man/cargo-build.1
+++ b/src/etc/man/cargo-build.1
@@ -364,20 +364,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-check.1 b/src/etc/man/cargo-check.1
index e8ea64ba4b1..e5c1d2f090c 100644
--- a/src/etc/man/cargo-check.1
+++ b/src/etc/man/cargo-check.1
@@ -355,20 +355,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-clean.1 b/src/etc/man/cargo-clean.1
index f380f1582d3..bbdebd3c8af 100644
--- a/src/etc/man/cargo-clean.1
+++ b/src/etc/man/cargo-clean.1
@@ -170,20 +170,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-doc.1 b/src/etc/man/cargo-doc.1
index 04356e75e8e..891fe20f890 100644
--- a/src/etc/man/cargo-doc.1
+++ b/src/etc/man/cargo-doc.1
@@ -324,20 +324,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-fetch.1 b/src/etc/man/cargo-fetch.1
index c2f4fdd047f..41fa1d60b1e 100644
--- a/src/etc/man/cargo-fetch.1
+++ b/src/etc/man/cargo-fetch.1
@@ -131,20 +131,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-fix.1 b/src/etc/man/cargo-fix.1
index f20c7115051..fd73fa0f5cb 100644
--- a/src/etc/man/cargo-fix.1
+++ b/src/etc/man/cargo-fix.1
@@ -450,20 +450,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-generate-lockfile.1 b/src/etc/man/cargo-generate-lockfile.1
index d1fb39963a9..04d609a8e0a 100644
--- a/src/etc/man/cargo-generate-lockfile.1
+++ b/src/etc/man/cargo-generate-lockfile.1
@@ -124,20 +124,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-metadata.1 b/src/etc/man/cargo-metadata.1
index bdd2f6bc3bc..ad6dee4ebb5 100644
--- a/src/etc/man/cargo-metadata.1
+++ b/src/etc/man/cargo-metadata.1
@@ -484,20 +484,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-package.1 b/src/etc/man/cargo-package.1
index 7d20c6f38fb..0e162bbfd12 100644
--- a/src/etc/man/cargo-package.1
+++ b/src/etc/man/cargo-package.1
@@ -341,20 +341,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Miscellaneous Options"
.sp
\fB\-j\fR \fIN\fR,
diff --git a/src/etc/man/cargo-pkgid.1 b/src/etc/man/cargo-pkgid.1
index 355ffcc7349..94c4fd1ea42 100644
--- a/src/etc/man/cargo-pkgid.1
+++ b/src/etc/man/cargo-pkgid.1
@@ -159,20 +159,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-publish.1 b/src/etc/man/cargo-publish.1
index 8f0e2eb4a4f..a41c729ff1f 100644
--- a/src/etc/man/cargo-publish.1
+++ b/src/etc/man/cargo-publish.1
@@ -222,20 +222,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Miscellaneous Options"
.sp
\fB\-j\fR \fIN\fR,
diff --git a/src/etc/man/cargo-remove.1 b/src/etc/man/cargo-remove.1
index 2ab2dfc73c6..15d964f9981 100644
--- a/src/etc/man/cargo-remove.1
+++ b/src/etc/man/cargo-remove.1
@@ -119,20 +119,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Package Selection"
.sp
\fB\-p\fR \fIspec\fR\[u2026],
diff --git a/src/etc/man/cargo-run.1 b/src/etc/man/cargo-run.1
index 404c03a83dc..2e95cf4f7f3 100644
--- a/src/etc/man/cargo-run.1
+++ b/src/etc/man/cargo-run.1
@@ -259,20 +259,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-rustc.1 b/src/etc/man/cargo-rustc.1
index 6bcb3a5a4bb..971c9218716 100644
--- a/src/etc/man/cargo-rustc.1
+++ b/src/etc/man/cargo-rustc.1
@@ -374,20 +374,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-rustdoc.1 b/src/etc/man/cargo-rustdoc.1
index fb7ee3c5178..c624de72c2f 100644
--- a/src/etc/man/cargo-rustdoc.1
+++ b/src/etc/man/cargo-rustdoc.1
@@ -341,20 +341,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1
index acc4b27b2b1..57175befad3 100644
--- a/src/etc/man/cargo-test.1
+++ b/src/etc/man/cargo-test.1
@@ -484,20 +484,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-tree.1 b/src/etc/man/cargo-tree.1
index bc39957fcdc..8dbda8778d2 100644
--- a/src/etc/man/cargo-tree.1
+++ b/src/etc/man/cargo-tree.1
@@ -307,20 +307,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Feature Selection"
The feature flags allow you to control which features are enabled. When no
feature options are given, the \fBdefault\fR feature is activated for every
diff --git a/src/etc/man/cargo-update.1 b/src/etc/man/cargo-update.1
index 6b8c6c7c163..3b6a86d91d7 100644
--- a/src/etc/man/cargo-update.1
+++ b/src/etc/man/cargo-update.1
@@ -181,20 +181,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
diff --git a/src/etc/man/cargo-vendor.1 b/src/etc/man/cargo-vendor.1
index 4a52bad5503..0182f8eb37f 100644
--- a/src/etc/man/cargo-vendor.1
+++ b/src/etc/man/cargo-vendor.1
@@ -100,20 +100,6 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with
-\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing
-\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will
-either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist.
-This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#14421\fR ).
-.RE
.SS "Display Options"
.sp
\fB\-v\fR,
diff --git a/tests/testsuite/cargo/z_help/stdout.term.svg b/tests/testsuite/cargo/z_help/stdout.term.svg
index 20006653417..694cf8d00d5 100644
--- a/tests/testsuite/cargo/z_help/stdout.term.svg
+++ b/tests/testsuite/cargo/z_help/stdout.term.svg
@@ -1,4 +1,4 @@
-