Skip to content

Commit ba3311e

Browse files
committed
Auto merge of #9092 - ehuss:unstable-updates, r=alexcrichton
Unstable updates This is a collection of updates for unstable/nightly feature support, intended to provide better messages for users and better internal and external documentation. Separated by commit, in summary: * Added comments and new docstrings for improved internal documentation. * Added new documentation to the reference guide on how unstable things work. * Also added redirects for stabilized features so any external links won't be broken. * Add a targeted error message if you put `cargo-features` in the wrong place in `Cargo.toml`. * Remove `publish-lockfile`. The feature was stabilized without the key in #7026 about 1.5 years ago. Also added "removed" support for features, which prints out a more helpful error message. * Add help messages about stabilized `-Z` flags (instead of spitting out an unhelpful error message). * Add help messages about stabilized `cargo-features` features. * Add more context to the error when using `cargo-features` on stable. * Unhide nightly CLI flags. I changed my mind on how these should work. I think it is useful to "advertise" the existence of these options on stable. The error message if you try to use it should help guide on what to do. Closes #9074.
2 parents 783bc43 + a58e7ff commit ba3311e

File tree

16 files changed

+473
-169
lines changed

16 files changed

+473
-169
lines changed

src/bin/cargo/cli.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,12 @@ See 'cargo help <command>' for more information on a specific command.\n",
327327
.arg(opt("locked", "Require Cargo.lock is up to date").global(true))
328328
.arg(opt("offline", "Run without accessing the network").global(true))
329329
.arg(
330-
multi_opt("config", "KEY=VALUE", "Override a configuration value")
331-
.global(true)
332-
.hidden(true),
330+
multi_opt(
331+
"config",
332+
"KEY=VALUE",
333+
"Override a configuration value (unstable)",
334+
)
335+
.global(true),
333336
)
334337
.arg(
335338
Arg::with_name("unstable-features")

src/bin/cargo/commands/login.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub fn cli() -> App {
1010
)
1111
.arg(opt("quiet", "No output printed to stdout").short("q"))
1212
.arg(Arg::with_name("token"))
13+
// --host is deprecated (use --registry instead)
1314
.arg(
1415
opt("host", "Host to set the token for")
1516
.value_name("HOST")

src/bin/cargo/commands/tree.rs

+5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ pub fn cli() -> App {
1919
"Display the tree for all packages in the workspace",
2020
"Exclude specific workspace members",
2121
)
22+
// Deprecated, use --no-dedupe instead.
2223
.arg(Arg::with_name("all").long("all").short("a").hidden(true))
24+
// Deprecated, use --target=all instead.
2325
.arg(
2426
Arg::with_name("all-targets")
2527
.long("all-targets")
@@ -30,6 +32,7 @@ pub fn cli() -> App {
3032
"Filter dependencies matching the given target-triple (default host platform). \
3133
Pass `all` to include all targets.",
3234
)
35+
// Deprecated, use -e=no-dev instead.
3336
.arg(
3437
Arg::with_name("no-dev-dependencies")
3538
.long("no-dev-dependencies")
@@ -52,7 +55,9 @@ pub fn cli() -> App {
5255
)
5356
.short("i"),
5457
)
58+
// Deprecated, use --prefix=none instead.
5559
.arg(Arg::with_name("no-indent").long("no-indent").hidden(true))
60+
// Deprecated, use --prefix=depth instead.
5661
.arg(
5762
Arg::with_name("prefix-depth")
5863
.long("prefix-depth")

src/bin/cargo/commands/vendor.rs

+4
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,25 @@ pub fn cli() -> App {
3232
.long("versioned-dirs")
3333
.help("Always include version in subdir name"),
3434
)
35+
// Not supported.
3536
.arg(
3637
Arg::with_name("no-merge-sources")
3738
.long("no-merge-sources")
3839
.hidden(true),
3940
)
41+
// Not supported.
4042
.arg(
4143
Arg::with_name("relative-path")
4244
.long("relative-path")
4345
.hidden(true),
4446
)
47+
// Not supported.
4548
.arg(
4649
Arg::with_name("only-git-deps")
4750
.long("only-git-deps")
4851
.hidden(true),
4952
)
53+
// Not supported.
5054
.arg(
5155
Arg::with_name("disallow-duplicates")
5256
.long("disallow-duplicates")

0 commit comments

Comments
 (0)