From d500051754434b8febf04bdcd608bf888c6559fc Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 28 Mar 2023 05:39:43 -0500 Subject: [PATCH] WIP: fix(cli): Make --help easier to browse This mirrors some of the categories from `cargo help` (the man pages). --- src/bin/cargo/commands/bench.rs | 12 +- src/bin/cargo/commands/build.rs | 2 +- src/bin/cargo/commands/check.rs | 2 +- src/bin/cargo/commands/doc.rs | 2 +- src/bin/cargo/commands/fix.rs | 2 +- src/bin/cargo/commands/package.rs | 6 +- src/bin/cargo/commands/run.rs | 2 +- src/bin/cargo/commands/rustc.rs | 2 +- src/bin/cargo/commands/rustdoc.rs | 2 +- src/bin/cargo/commands/test.rs | 2 +- src/bin/cargo/commands/tree.rs | 2 +- src/cargo/util/command_prelude.rs | 106 ++++++++++++------ tests/testsuite/cargo_add/help/stdout.log | 7 +- tests/testsuite/cargo_bench/help/stdout.log | 80 +++++++------ tests/testsuite/cargo_build/help/stdout.log | 50 +++++---- tests/testsuite/cargo_check/help/stdout.log | 50 +++++---- tests/testsuite/cargo_clean/help/stdout.log | 30 ++--- tests/testsuite/cargo_doc/help/stdout.log | 40 ++++--- tests/testsuite/cargo_fetch/help/stdout.log | 4 +- tests/testsuite/cargo_fix/help/stdout.log | 86 +++++++------- tests/testsuite/cargo_install/help/stdout.log | 76 +++++++------ .../testsuite/cargo_metadata/help/stdout.log | 8 +- tests/testsuite/cargo_package/help/stdout.log | 52 +++++---- tests/testsuite/cargo_pkgid/help/stdout.log | 4 +- tests/testsuite/cargo_publish/help/stdout.log | 52 +++++---- tests/testsuite/cargo_remove/help/stdout.log | 4 +- tests/testsuite/cargo_run/help/stdout.log | 54 +++++---- tests/testsuite/cargo_rustc/help/stdout.log | 44 +++++--- tests/testsuite/cargo_rustdoc/help/stdout.log | 72 ++++++------ tests/testsuite/cargo_test/help/stdout.log | 50 +++++---- tests/testsuite/cargo_tree/help/stdout.log | 22 ++-- .../testsuite/cargo_uninstall/help/stdout.log | 4 +- tests/testsuite/cargo_update/help/stdout.log | 4 +- 33 files changed, 545 insertions(+), 390 deletions(-) diff --git a/src/bin/cargo/commands/bench.rs b/src/bin/cargo/commands/bench.rs index 3739d880e2c1..ba1d8b7cf07c 100644 --- a/src/bin/cargo/commands/bench.rs +++ b/src/bin/cargo/commands/bench.rs @@ -16,6 +16,12 @@ pub fn cli() -> Command { .num_args(0..) .last(true), ) + .arg_package_spec( + "Package to run benchmarks for", + "Benchmark all packages in the workspace", + "Exclude packages from the benchmark", + ) + .arg_features() .arg_targets_all( "Benchmark only this package's library", "Benchmark only the specified binary", @@ -29,14 +35,8 @@ pub fn cli() -> Command { "Benchmark all targets", ) .arg(flag("no-run", "Compile, but don't run benchmarks")) - .arg_package_spec( - "Package to run benchmarks for", - "Benchmark all packages in the workspace", - "Exclude packages from the benchmark", - ) .arg_jobs() .arg_profile("Build artifacts with the specified profile") - .arg_features() .arg_target_triple("Build for the target triple") .arg_target_dir() .arg_manifest_path() diff --git a/src/bin/cargo/commands/build.rs b/src/bin/cargo/commands/build.rs index a78da38a4e3f..28586566a941 100644 --- a/src/bin/cargo/commands/build.rs +++ b/src/bin/cargo/commands/build.rs @@ -13,6 +13,7 @@ pub fn cli() -> Command { "Build all packages in the workspace", "Exclude packages from the build", ) + .arg_features() .arg_jobs() .arg_targets_all( "Build only this package's library", @@ -28,7 +29,6 @@ pub fn cli() -> Command { ) .arg_release("Build artifacts in release mode, with optimizations") .arg_profile("Build artifacts with the specified profile") - .arg_features() .arg_target_triple("Build for the target triple") .arg_target_dir() .arg( diff --git a/src/bin/cargo/commands/check.rs b/src/bin/cargo/commands/check.rs index c9f6e0b38876..1aee48dfbbe2 100644 --- a/src/bin/cargo/commands/check.rs +++ b/src/bin/cargo/commands/check.rs @@ -13,6 +13,7 @@ pub fn cli() -> Command { "Check all packages in the workspace", "Exclude packages from the check", ) + .arg_features() .arg_jobs() .arg_targets_all( "Check only this package's library", @@ -28,7 +29,6 @@ pub fn cli() -> Command { ) .arg_release("Check artifacts in release mode, with optimizations") .arg_profile("Check artifacts with the specified profile") - .arg_features() .arg_target_triple("Check for the target triple") .arg_target_dir() .arg_manifest_path() diff --git a/src/bin/cargo/commands/doc.rs b/src/bin/cargo/commands/doc.rs index 932058afb0b8..cc5bbdb48a1d 100644 --- a/src/bin/cargo/commands/doc.rs +++ b/src/bin/cargo/commands/doc.rs @@ -17,6 +17,7 @@ pub fn cli() -> Command { "Document all packages in the workspace", "Exclude packages from the build", ) + .arg_features() .arg(flag( "no-deps", "Don't build documentation for dependencies", @@ -32,7 +33,6 @@ pub fn cli() -> Command { ) .arg_release("Build artifacts in release mode, with optimizations") .arg_profile("Build artifacts with the specified profile") - .arg_features() .arg_target_triple("Build for the target triple") .arg_target_dir() .arg_manifest_path() diff --git a/src/bin/cargo/commands/fix.rs b/src/bin/cargo/commands/fix.rs index 5238d5852d16..0498a8299f71 100644 --- a/src/bin/cargo/commands/fix.rs +++ b/src/bin/cargo/commands/fix.rs @@ -11,6 +11,7 @@ pub fn cli() -> Command { "Fix all packages in the workspace", "Exclude packages from the fixes", ) + .arg_features() .arg_jobs() .arg_targets_all( "Fix only this package's library", @@ -26,7 +27,6 @@ pub fn cli() -> Command { ) .arg_release("Fix artifacts in release mode, with optimizations") .arg_profile("Build artifacts with the specified profile") - .arg_features() .arg_target_triple("Fix for the target triple") .arg_target_dir() .arg_manifest_path() diff --git a/src/bin/cargo/commands/package.rs b/src/bin/cargo/commands/package.rs index cef530fdc6c9..d7f40e036b8c 100644 --- a/src/bin/cargo/commands/package.rs +++ b/src/bin/cargo/commands/package.rs @@ -25,14 +25,14 @@ pub fn cli() -> Command { "allow-dirty", "Allow dirty working directories to be packaged", )) - .arg_target_triple("Build for the target triple") - .arg_target_dir() - .arg_features() .arg_package_spec_no_all( "Package(s) to assemble", "Assemble all packages in the workspace", "Don't assemble specified packages", ) + .arg_features() + .arg_target_triple("Build for the target triple") + .arg_target_dir() .arg_manifest_path() .arg_jobs() .after_help("Run `cargo help package` for more detailed information.\n") diff --git a/src/bin/cargo/commands/run.rs b/src/bin/cargo/commands/run.rs index 366e19396d62..2e59cc00c2ba 100644 --- a/src/bin/cargo/commands/run.rs +++ b/src/bin/cargo/commands/run.rs @@ -27,10 +27,10 @@ pub fn cli() -> Command { "Name of the example target to run", ) .arg_package("Package with the target to run") + .arg_features() .arg_jobs() .arg_release("Build artifacts in release mode, with optimizations") .arg_profile("Build artifacts with the specified profile") - .arg_features() .arg_target_triple("Build for the target triple") .arg_target_dir() .arg_manifest_path() diff --git a/src/bin/cargo/commands/rustc.rs b/src/bin/cargo/commands/rustc.rs index de73eb80c8da..999c75241fe1 100644 --- a/src/bin/cargo/commands/rustc.rs +++ b/src/bin/cargo/commands/rustc.rs @@ -16,6 +16,7 @@ pub fn cli() -> Command { .trailing_var_arg(true), ) .arg_package("Package to build") + .arg_features() .arg_jobs() .arg_targets_all( "Build only this package's library", @@ -31,7 +32,6 @@ pub fn cli() -> Command { ) .arg_release("Build artifacts in release mode, with optimizations") .arg_profile("Build artifacts with the specified profile") - .arg_features() .arg_target_triple("Target triple which compiles will be for") .arg( opt( diff --git a/src/bin/cargo/commands/rustdoc.rs b/src/bin/cargo/commands/rustdoc.rs index e87f435fd1f8..216278f2073f 100644 --- a/src/bin/cargo/commands/rustdoc.rs +++ b/src/bin/cargo/commands/rustdoc.rs @@ -17,6 +17,7 @@ pub fn cli() -> Command { "Opens the docs in a browser after the operation", )) .arg_package("Package to document") + .arg_features() .arg_jobs() .arg_targets_all( "Build only this package's library", @@ -32,7 +33,6 @@ pub fn cli() -> Command { ) .arg_release("Build artifacts in release mode, with optimizations") .arg_profile("Build artifacts with the specified profile") - .arg_features() .arg_target_triple("Build for the target triple") .arg_target_dir() .arg_manifest_path() diff --git a/src/bin/cargo/commands/test.rs b/src/bin/cargo/commands/test.rs index 607655aaf335..ebf7b92670c5 100644 --- a/src/bin/cargo/commands/test.rs +++ b/src/bin/cargo/commands/test.rs @@ -44,10 +44,10 @@ pub fn cli() -> Command { "Test all packages in the workspace", "Exclude packages from the test", ) + .arg_features() .arg_jobs() .arg_release("Build artifacts in release mode, with optimizations") .arg_profile("Build artifacts with the specified profile") - .arg_features() .arg_target_triple("Build for the target triple") .arg_target_dir() .arg_manifest_path() diff --git a/src/bin/cargo/commands/tree.rs b/src/bin/cargo/commands/tree.rs index 94bf3fff1067..1197cd262cf8 100644 --- a/src/bin/cargo/commands/tree.rs +++ b/src/bin/cargo/commands/tree.rs @@ -19,13 +19,13 @@ pub fn cli() -> Command { "Display the tree for all packages in the workspace", "Exclude specific workspace members", ) + .arg_features() .arg( flag("all", "Deprecated, use --no-dedupe instead") .short('a') .hide(true), ) .arg(flag("all-targets", "Deprecated, use --target=all instead").hide(true)) - .arg_features() .arg_target_triple( "Filter dependencies matching the given target-triple (default host platform). \ Pass `all` to include all targets.", diff --git a/src/cargo/util/command_prelude.rs b/src/cargo/util/command_prelude.rs index 46ed7dd7cd1d..c8e890648ede 100644 --- a/src/cargo/util/command_prelude.rs +++ b/src/cargo/util/command_prelude.rs @@ -26,6 +26,13 @@ pub use clap::Command; use super::config::JobsConfig; +pub mod heading { + pub const PACKAGE_SELECTION: &str = "Package Selection"; + pub const TARGET_SELECTION: &str = "Target Selection"; + pub const FEATURE_SELECTION: &str = "Feature Selection"; + pub const COMPILATION_OPTIONS: &str = "Compilation Options"; +} + pub trait CommandExt: Sized { fn _arg(self, arg: Arg) -> Self; @@ -37,8 +44,10 @@ pub trait CommandExt: Sized { all: &'static str, exclude: &'static str, ) -> Self { - self.arg_package_spec_no_all(package, all, exclude) - ._arg(flag("all", "Alias for --workspace (deprecated)")) + self.arg_package_spec_no_all(package, all, exclude)._arg( + flag("all", "Alias for --workspace (deprecated)") + .help_heading(heading::PACKAGE_SELECTION), + ) } /// Variant of arg_package_spec that does not include the `--all` flag @@ -51,19 +60,24 @@ pub trait CommandExt: Sized { exclude: &'static str, ) -> Self { self.arg_package_spec_simple(package) - ._arg(flag("workspace", all)) - ._arg(multi_opt("exclude", "SPEC", exclude)) + ._arg(flag("workspace", all).help_heading(heading::PACKAGE_SELECTION)) + ._arg(multi_opt("exclude", "SPEC", exclude).help_heading(heading::PACKAGE_SELECTION)) } fn arg_package_spec_simple(self, package: &'static str) -> Self { - self._arg(optional_multi_opt("package", "SPEC", package).short('p')) + self._arg( + optional_multi_opt("package", "SPEC", package) + .short('p') + .help_heading(heading::PACKAGE_SELECTION), + ) } fn arg_package(self, package: &'static str) -> Self { self._arg( optional_opt("package", package) .short('p') - .value_name("SPEC"), + .value_name("SPEC") + .help_heading(heading::PACKAGE_SELECTION), ) } @@ -94,11 +108,13 @@ pub trait CommandExt: Sized { all: &'static str, ) -> Self { self.arg_targets_lib_bin_example(lib, bin, bins, example, examples) - ._arg(flag("tests", tests)) - ._arg(optional_multi_opt("test", "NAME", test)) - ._arg(flag("benches", benches)) - ._arg(optional_multi_opt("bench", "NAME", bench)) - ._arg(flag("all-targets", all)) + ._arg(flag("tests", tests).help_heading(heading::TARGET_SELECTION)) + ._arg(optional_multi_opt("test", "NAME", test).help_heading(heading::TARGET_SELECTION)) + ._arg(flag("benches", benches).help_heading(heading::TARGET_SELECTION)) + ._arg( + optional_multi_opt("bench", "NAME", bench).help_heading(heading::TARGET_SELECTION), + ) + ._arg(flag("all-targets", all).help_heading(heading::TARGET_SELECTION)) } fn arg_targets_lib_bin_example( @@ -109,11 +125,14 @@ pub trait CommandExt: Sized { example: &'static str, examples: &'static str, ) -> Self { - self._arg(flag("lib", lib)) - ._arg(flag("bins", bins)) - ._arg(optional_multi_opt("bin", "NAME", bin)) - ._arg(flag("examples", examples)) - ._arg(optional_multi_opt("example", "NAME", example)) + self._arg(flag("lib", lib).help_heading(heading::TARGET_SELECTION)) + ._arg(flag("bins", bins).help_heading(heading::TARGET_SELECTION)) + ._arg(optional_multi_opt("bin", "NAME", bin).help_heading(heading::TARGET_SELECTION)) + ._arg(flag("examples", examples).help_heading(heading::TARGET_SELECTION)) + ._arg( + optional_multi_opt("example", "NAME", example) + .help_heading(heading::TARGET_SELECTION), + ) } fn arg_targets_bins_examples( @@ -123,15 +142,21 @@ pub trait CommandExt: Sized { example: &'static str, examples: &'static str, ) -> Self { - self._arg(optional_multi_opt("bin", "NAME", bin)) - ._arg(flag("bins", bins)) - ._arg(optional_multi_opt("example", "NAME", example)) - ._arg(flag("examples", examples)) + self._arg(optional_multi_opt("bin", "NAME", bin).help_heading(heading::TARGET_SELECTION)) + ._arg(flag("bins", bins).help_heading(heading::TARGET_SELECTION)) + ._arg( + optional_multi_opt("example", "NAME", example) + .help_heading(heading::TARGET_SELECTION), + ) + ._arg(flag("examples", examples).help_heading(heading::TARGET_SELECTION)) } fn arg_targets_bin_example(self, bin: &'static str, example: &'static str) -> Self { - self._arg(optional_multi_opt("bin", "NAME", bin)) - ._arg(optional_multi_opt("example", "NAME", example)) + self._arg(optional_multi_opt("bin", "NAME", bin).help_heading(heading::TARGET_SELECTION)) + ._arg( + optional_multi_opt("example", "NAME", example) + .help_heading(heading::TARGET_SELECTION), + ) } fn arg_features(self) -> Self { @@ -141,21 +166,36 @@ pub trait CommandExt: Sized { "FEATURES", "Space or comma separated list of features to activate", ) - .short('F'), + .short('F') + .help_heading(heading::FEATURE_SELECTION), + ) + ._arg( + flag("all-features", "Activate all available features") + .help_heading(heading::FEATURE_SELECTION), + ) + ._arg( + flag( + "no-default-features", + "Do not activate the `default` feature", + ) + .help_heading(heading::FEATURE_SELECTION), ) - ._arg(flag("all-features", "Activate all available features")) - ._arg(flag( - "no-default-features", - "Do not activate the `default` feature", - )) } fn arg_release(self, release: &'static str) -> Self { - self._arg(flag("release", release).short('r')) + self._arg( + flag("release", release) + .short('r') + .help_heading(heading::COMPILATION_OPTIONS), + ) } fn arg_profile(self, profile: &'static str) -> Self { - self._arg(opt("profile", profile).value_name("PROFILE-NAME")) + self._arg( + opt("profile", profile) + .value_name("PROFILE-NAME") + .help_heading(heading::COMPILATION_OPTIONS), + ) } fn arg_doc(self, doc: &'static str) -> Self { @@ -163,12 +203,14 @@ pub trait CommandExt: Sized { } fn arg_target_triple(self, target: &'static str) -> Self { - self._arg(multi_opt("target", "TRIPLE", target)) + self._arg(multi_opt("target", "TRIPLE", target).help_heading(heading::COMPILATION_OPTIONS)) } fn arg_target_dir(self) -> Self { self._arg( - opt("target-dir", "Directory for all generated artifacts").value_name("DIRECTORY"), + opt("target-dir", "Directory for all generated artifacts") + .value_name("DIRECTORY") + .help_heading(heading::COMPILATION_OPTIONS), ) } diff --git a/tests/testsuite/cargo_add/help/stdout.log b/tests/testsuite/cargo_add/help/stdout.log index 0bb8781853f1..24bdb75b3d94 100644 --- a/tests/testsuite/cargo_add/help/stdout.log +++ b/tests/testsuite/cargo_add/help/stdout.log @@ -45,9 +45,6 @@ Options: --manifest-path Path to Cargo.toml - -p, --package [] - Package to modify - -q, --quiet Do not print cargo log messages @@ -78,6 +75,10 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Package Selection: + -p, --package [] + Package to modify + Source: --path Filesystem path to local crate to add diff --git a/tests/testsuite/cargo_bench/help/stdout.log b/tests/testsuite/cargo_bench/help/stdout.log index 09f36154a5f1..0772200db892 100644 --- a/tests/testsuite/cargo_bench/help/stdout.log +++ b/tests/testsuite/cargo_bench/help/stdout.log @@ -7,44 +7,52 @@ Arguments: [args]... Arguments for the bench binary Options: - -q, --quiet Do not print cargo log messages - --lib Benchmark only this package's library - --bins Benchmark all binaries - --bin [] Benchmark only the specified binary - --examples Benchmark all examples - --example [] Benchmark only the specified example - --tests Benchmark all tests - --test [] Benchmark only the specified test target - --benches Benchmark all benches - --bench [] Benchmark only the specified bench target - --all-targets Benchmark all targets - --no-run Compile, but don't run benchmarks - -p, --package [] Package to run benchmarks for - --workspace Benchmark all packages in the workspace - --exclude Exclude packages from the benchmark - --all Alias for --workspace (deprecated) - -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + -q, --quiet Do not print cargo log messages + --no-run Compile, but don't run benchmarks + -j, --jobs Number of parallel jobs, defaults to # of CPUs. + --keep-going Do not abort the build as soon as there is an error (unstable) + --manifest-path Path to Cargo.toml + --ignore-rust-version Ignore `rust-version` specification in packages + --message-format Error format + --no-fail-fast Run all benchmarks regardless of failure + --unit-graph Output build graph in JSON (unstable) + --timings[=] Timing output formats (unstable) (comma separated): html, json + -h, --help Print help + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + --color Coloring: auto, always, never + --frozen Require Cargo.lock and cache are up to date + --locked Require Cargo.lock is up to date + --offline Run without accessing the network + --config Override a configuration value + -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + details + +Package Selection: + -p, --package [] Package to run benchmarks for + --workspace Benchmark all packages in the workspace + --exclude Exclude packages from the benchmark + --all Alias for --workspace (deprecated) + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Target Selection: + --lib Benchmark only this package's library + --bins Benchmark all binaries + --bin [] Benchmark only the specified binary + --examples Benchmark all examples + --example [] Benchmark only the specified example + --tests Benchmark all tests + --test [] Benchmark only the specified test target + --benches Benchmark all benches + --bench [] Benchmark only the specified bench target + --all-targets Benchmark all targets + +Compilation Options: --profile Build artifacts with the specified profile - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature --target Build for the target triple --target-dir Directory for all generated artifacts - --manifest-path Path to Cargo.toml - --ignore-rust-version Ignore `rust-version` specification in packages - --message-format Error format - --no-fail-fast Run all benchmarks regardless of failure - --unit-graph Output build graph in JSON (unstable) - --timings[=] Timing output formats (unstable) (comma separated): html, json - -h, --help Print help - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --color Coloring: auto, always, never - --frozen Require Cargo.lock and cache are up to date - --locked Require Cargo.lock is up to date - --offline Run without accessing the network - --config Override a configuration value - -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - details Run `cargo help bench` for more detailed information. diff --git a/tests/testsuite/cargo_build/help/stdout.log b/tests/testsuite/cargo_build/help/stdout.log index 1f13061b8a73..a7084be0d73d 100644 --- a/tests/testsuite/cargo_build/help/stdout.log +++ b/tests/testsuite/cargo_build/help/stdout.log @@ -4,29 +4,8 @@ Usage: cargo[EXE] build [OPTIONS] Options: -q, --quiet Do not print cargo log messages - -p, --package [] Package to build (see `cargo help pkgid`) - --workspace Build all packages in the workspace - --exclude Exclude packages from the build - --all Alias for --workspace (deprecated) -j, --jobs Number of parallel jobs, defaults to # of CPUs. --keep-going Do not abort the build as soon as there is an error (unstable) - --lib Build only this package's library - --bins Build all binaries - --bin [] Build only the specified binary - --examples Build all examples - --example [] Build only the specified example - --tests Build all tests - --test [] Build only the specified test target - --benches Build all benches - --bench [] Build only the specified bench target - --all-targets Build all targets - -r, --release Build artifacts in release mode, with optimizations - --profile Build artifacts with the specified profile - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature - --target Build for the target triple - --target-dir Directory for all generated artifacts --out-dir Copy final artifacts to this directory (unstable) --manifest-path Path to Cargo.toml --ignore-rust-version Ignore `rust-version` specification in packages @@ -45,4 +24,33 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Package Selection: + -p, --package [] Package to build (see `cargo help pkgid`) + --workspace Build all packages in the workspace + --exclude Exclude packages from the build + --all Alias for --workspace (deprecated) + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Target Selection: + --lib Build only this package's library + --bins Build all binaries + --bin [] Build only the specified binary + --examples Build all examples + --example [] Build only the specified example + --tests Build all tests + --test [] Build only the specified test target + --benches Build all benches + --bench [] Build only the specified bench target + --all-targets Build all targets + +Compilation Options: + -r, --release Build artifacts in release mode, with optimizations + --profile Build artifacts with the specified profile + --target Build for the target triple + --target-dir Directory for all generated artifacts + Run `cargo help build` for more detailed information. diff --git a/tests/testsuite/cargo_check/help/stdout.log b/tests/testsuite/cargo_check/help/stdout.log index 076bcb86947b..c33d92149c91 100644 --- a/tests/testsuite/cargo_check/help/stdout.log +++ b/tests/testsuite/cargo_check/help/stdout.log @@ -4,29 +4,8 @@ Usage: cargo[EXE] check [OPTIONS] Options: -q, --quiet Do not print cargo log messages - -p, --package [] Package(s) to check - --workspace Check all packages in the workspace - --exclude Exclude packages from the check - --all Alias for --workspace (deprecated) -j, --jobs Number of parallel jobs, defaults to # of CPUs. --keep-going Do not abort the build as soon as there is an error (unstable) - --lib Check only this package's library - --bins Check all binaries - --bin [] Check only the specified binary - --examples Check all examples - --example [] Check only the specified example - --tests Check all tests - --test [] Check only the specified test target - --benches Check all benches - --bench [] Check only the specified bench target - --all-targets Check all targets - -r, --release Check artifacts in release mode, with optimizations - --profile Check artifacts with the specified profile - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature - --target Check for the target triple - --target-dir Directory for all generated artifacts --manifest-path Path to Cargo.toml --ignore-rust-version Ignore `rust-version` specification in packages --message-format Error format @@ -43,4 +22,33 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Package Selection: + -p, --package [] Package(s) to check + --workspace Check all packages in the workspace + --exclude Exclude packages from the check + --all Alias for --workspace (deprecated) + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Target Selection: + --lib Check only this package's library + --bins Check all binaries + --bin [] Check only the specified binary + --examples Check all examples + --example [] Check only the specified example + --tests Check all tests + --test [] Check only the specified test target + --benches Check all benches + --bench [] Check only the specified bench target + --all-targets Check all targets + +Compilation Options: + -r, --release Check artifacts in release mode, with optimizations + --profile Check artifacts with the specified profile + --target Check for the target triple + --target-dir Directory for all generated artifacts + Run `cargo help check` for more detailed information. diff --git a/tests/testsuite/cargo_clean/help/stdout.log b/tests/testsuite/cargo_clean/help/stdout.log index ea2f0ef0bf85..3a9318443891 100644 --- a/tests/testsuite/cargo_clean/help/stdout.log +++ b/tests/testsuite/cargo_clean/help/stdout.log @@ -3,22 +3,26 @@ Remove artifacts that cargo has generated in the past Usage: cargo[EXE] clean [OPTIONS] Options: - -q, --quiet Do not print cargo log messages - -p, --package [] Package to clean artifacts for - --manifest-path Path to Cargo.toml + -q, --quiet Do not print cargo log messages + --manifest-path Path to Cargo.toml + --doc Whether or not to clean just the documentation directory + -h, --help Print help + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + --color Coloring: auto, always, never + --frozen Require Cargo.lock and cache are up to date + --locked Require Cargo.lock is up to date + --offline Run without accessing the network + --config Override a configuration value + -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + details + +Package Selection: + -p, --package [] Package to clean artifacts for + +Compilation Options: --target Target triple to clean output for --target-dir Directory for all generated artifacts -r, --release Whether or not to clean release artifacts --profile Clean artifacts of the specified profile - --doc Whether or not to clean just the documentation directory - -h, --help Print help - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --color Coloring: auto, always, never - --frozen Require Cargo.lock and cache are up to date - --locked Require Cargo.lock is up to date - --offline Run without accessing the network - --config Override a configuration value - -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - details Run `cargo help clean` for more detailed information. diff --git a/tests/testsuite/cargo_doc/help/stdout.log b/tests/testsuite/cargo_doc/help/stdout.log index 51e5d14bb0ea..3c1b03452120 100644 --- a/tests/testsuite/cargo_doc/help/stdout.log +++ b/tests/testsuite/cargo_doc/help/stdout.log @@ -5,26 +5,10 @@ Usage: cargo[EXE] doc [OPTIONS] Options: -q, --quiet Do not print cargo log messages --open Opens the docs in a browser after the operation - -p, --package [] Package to document - --workspace Document all packages in the workspace - --exclude Exclude packages from the build - --all Alias for --workspace (deprecated) --no-deps Don't build documentation for dependencies --document-private-items Document private items -j, --jobs Number of parallel jobs, defaults to # of CPUs. --keep-going Do not abort the build as soon as there is an error (unstable) - --lib Document only this package's library - --bins Document all binaries - --bin [] Document only the specified binary - --examples Document all examples - --example [] Document only the specified example - -r, --release Build artifacts in release mode, with optimizations - --profile Build artifacts with the specified profile - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature - --target Build for the target triple - --target-dir Directory for all generated artifacts --manifest-path Path to Cargo.toml --message-format Error format --ignore-rust-version Ignore `rust-version` specification in packages @@ -40,4 +24,28 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Package Selection: + -p, --package [] Package to document + --workspace Document all packages in the workspace + --exclude Exclude packages from the build + --all Alias for --workspace (deprecated) + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Target Selection: + --lib Document only this package's library + --bins Document all binaries + --bin [] Document only the specified binary + --examples Document all examples + --example [] Document only the specified example + +Compilation Options: + -r, --release Build artifacts in release mode, with optimizations + --profile Build artifacts with the specified profile + --target Build for the target triple + --target-dir Directory for all generated artifacts + Run `cargo help doc` for more detailed information. diff --git a/tests/testsuite/cargo_fetch/help/stdout.log b/tests/testsuite/cargo_fetch/help/stdout.log index 9fbb295b67be..201dcc22615a 100644 --- a/tests/testsuite/cargo_fetch/help/stdout.log +++ b/tests/testsuite/cargo_fetch/help/stdout.log @@ -5,7 +5,6 @@ Usage: cargo[EXE] fetch [OPTIONS] Options: -q, --quiet Do not print cargo log messages --manifest-path Path to Cargo.toml - --target Fetch dependencies for the target triple -h, --help Print help -v, --verbose... Use verbose output (-vv very verbose/build.rs output) --color Coloring: auto, always, never @@ -16,4 +15,7 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Compilation Options: + --target Fetch dependencies for the target triple + Run `cargo help fetch` for more detailed information. diff --git a/tests/testsuite/cargo_fix/help/stdout.log b/tests/testsuite/cargo_fix/help/stdout.log index 42d486da7766..68fdb9f6594b 100644 --- a/tests/testsuite/cargo_fix/help/stdout.log +++ b/tests/testsuite/cargo_fix/help/stdout.log @@ -3,48 +3,56 @@ Automatically fix lint warnings reported by rustc Usage: cargo[EXE] fix [OPTIONS] Options: - -q, --quiet Do not print cargo log messages - -p, --package [] Package(s) to fix - --workspace Fix all packages in the workspace - --exclude Exclude packages from the fixes - --all Alias for --workspace (deprecated) - -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) - --lib Fix only this package's library - --bins Fix all binaries - --bin [] Fix only the specified binary - --examples Fix all examples - --example [] Fix only the specified example - --tests Fix all tests - --test [] Fix only the specified test target - --benches Fix all benches - --bench [] Fix only the specified bench target - --all-targets Fix all targets (default) + -q, --quiet Do not print cargo log messages + -j, --jobs Number of parallel jobs, defaults to # of CPUs. + --keep-going Do not abort the build as soon as there is an error (unstable) + --manifest-path Path to Cargo.toml + --message-format Error format + --broken-code Fix code even if it already has compiler errors + --edition Fix in preparation for the next edition + --edition-idioms Fix warnings to migrate to the idioms of an edition + --allow-no-vcs Fix code even if a VCS was not detected + --allow-dirty Fix code even if the working directory is dirty + --allow-staged Fix code even if the working directory has staged changes + --ignore-rust-version Ignore `rust-version` specification in packages + --timings[=] Timing output formats (unstable) (comma separated): html, json + -h, --help Print help + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + --color Coloring: auto, always, never + --frozen Require Cargo.lock and cache are up to date + --locked Require Cargo.lock is up to date + --offline Run without accessing the network + --config Override a configuration value + -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + details + +Package Selection: + -p, --package [] Package(s) to fix + --workspace Fix all packages in the workspace + --exclude Exclude packages from the fixes + --all Alias for --workspace (deprecated) + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Target Selection: + --lib Fix only this package's library + --bins Fix all binaries + --bin [] Fix only the specified binary + --examples Fix all examples + --example [] Fix only the specified example + --tests Fix all tests + --test [] Fix only the specified test target + --benches Fix all benches + --bench [] Fix only the specified bench target + --all-targets Fix all targets (default) + +Compilation Options: -r, --release Fix artifacts in release mode, with optimizations --profile Build artifacts with the specified profile - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature --target Fix for the target triple --target-dir Directory for all generated artifacts - --manifest-path Path to Cargo.toml - --message-format Error format - --broken-code Fix code even if it already has compiler errors - --edition Fix in preparation for the next edition - --edition-idioms Fix warnings to migrate to the idioms of an edition - --allow-no-vcs Fix code even if a VCS was not detected - --allow-dirty Fix code even if the working directory is dirty - --allow-staged Fix code even if the working directory has staged changes - --ignore-rust-version Ignore `rust-version` specification in packages - --timings[=] Timing output formats (unstable) (comma separated): html, json - -h, --help Print help - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --color Coloring: auto, always, never - --frozen Require Cargo.lock and cache are up to date - --locked Require Cargo.lock is up to date - --offline Run without accessing the network - --config Override a configuration value - -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - details Run `cargo help fix` for more detailed information. diff --git a/tests/testsuite/cargo_install/help/stdout.log b/tests/testsuite/cargo_install/help/stdout.log index 8fb61711a40f..b665f7819da6 100644 --- a/tests/testsuite/cargo_install/help/stdout.log +++ b/tests/testsuite/cargo_install/help/stdout.log @@ -6,43 +6,49 @@ Arguments: [crate]... Options: - -q, --quiet Do not print cargo log messages - --version Specify a version to install - --git Git URL to install the specified crate from - --branch Branch to use when installing from git - --tag Tag to use when installing from git - --rev Specific commit to use when installing from git - --path Filesystem path to local crate to install - --list list all installed packages and their versions - -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) - -f, --force Force overwriting existing crates or binaries - --no-track Do not save tracking information - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature + -q, --quiet Do not print cargo log messages + --version Specify a version to install + --git Git URL to install the specified crate from + --branch Branch to use when installing from git + --tag Tag to use when installing from git + --rev Specific commit to use when installing from git + --path Filesystem path to local crate to install + --list list all installed packages and their versions + -j, --jobs Number of parallel jobs, defaults to # of CPUs. + --keep-going Do not abort the build as soon as there is an error (unstable) + -f, --force Force overwriting existing crates or binaries + --no-track Do not save tracking information + --debug Build in debug mode (with the 'dev' profile) instead of release mode + --root Directory to install packages into + --index Registry index to install from + --registry Registry to use + --ignore-rust-version Ignore `rust-version` specification in packages + --message-format Error format + --timings[=] Timing output formats (unstable) (comma separated): html, json + -h, --help Print help + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + --color Coloring: auto, always, never + --frozen Require Cargo.lock and cache are up to date + --locked Require Cargo.lock is up to date + --offline Run without accessing the network + --config Override a configuration value + -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + details + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Compilation Options: --profile Install artifacts with the specified profile - --debug Build in debug mode (with the 'dev' profile) instead of release mode - --bin [] Install only the specified binary - --bins Install all binaries - --example [] Install only the specified example - --examples Install all examples --target Build for the target triple --target-dir Directory for all generated artifacts - --root Directory to install packages into - --index Registry index to install from - --registry Registry to use - --ignore-rust-version Ignore `rust-version` specification in packages - --message-format Error format - --timings[=] Timing output formats (unstable) (comma separated): html, json - -h, --help Print help - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --color Coloring: auto, always, never - --frozen Require Cargo.lock and cache are up to date - --locked Require Cargo.lock is up to date - --offline Run without accessing the network - --config Override a configuration value - -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - details + +Target Selection: + --bin [] Install only the specified binary + --bins Install all binaries + --example [] Install only the specified example + --examples Install all examples Run `cargo help install` for more detailed information. diff --git a/tests/testsuite/cargo_metadata/help/stdout.log b/tests/testsuite/cargo_metadata/help/stdout.log index 199b5a4b8d69..dfd3e7a7e815 100644 --- a/tests/testsuite/cargo_metadata/help/stdout.log +++ b/tests/testsuite/cargo_metadata/help/stdout.log @@ -5,9 +5,6 @@ Usage: cargo[EXE] metadata [OPTIONS] Options: -q, --quiet Do not print cargo log messages - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature --filter-platform Only include resolve dependencies matching the given target-triple --no-deps Output information only about the workspace members and don't fetch dependencies @@ -23,4 +20,9 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + Run `cargo help metadata` for more detailed information. diff --git a/tests/testsuite/cargo_package/help/stdout.log b/tests/testsuite/cargo_package/help/stdout.log index cae5aa145643..4a0226bea563 100644 --- a/tests/testsuite/cargo_package/help/stdout.log +++ b/tests/testsuite/cargo_package/help/stdout.log @@ -3,30 +3,36 @@ Assemble the local package into a distributable tarball Usage: cargo[EXE] package [OPTIONS] Options: - -q, --quiet Do not print cargo log messages - -l, --list Print files included in a package without making one - --no-verify Don't verify the contents by building them - --no-metadata Ignore warnings about a lack of human-usable metadata - --allow-dirty Allow dirty working directories to be packaged + -q, --quiet Do not print cargo log messages + -l, --list Print files included in a package without making one + --no-verify Don't verify the contents by building them + --no-metadata Ignore warnings about a lack of human-usable metadata + --allow-dirty Allow dirty working directories to be packaged + --manifest-path Path to Cargo.toml + -j, --jobs Number of parallel jobs, defaults to # of CPUs. + --keep-going Do not abort the build as soon as there is an error (unstable) + -h, --help Print help + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + --color Coloring: auto, always, never + --frozen Require Cargo.lock and cache are up to date + --locked Require Cargo.lock is up to date + --offline Run without accessing the network + --config Override a configuration value + -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + details + +Package Selection: + -p, --package [] Package(s) to assemble + --workspace Assemble all packages in the workspace + --exclude Don't assemble specified packages + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Compilation Options: --target Build for the target triple --target-dir Directory for all generated artifacts - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature - -p, --package [] Package(s) to assemble - --workspace Assemble all packages in the workspace - --exclude Don't assemble specified packages - --manifest-path Path to Cargo.toml - -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) - -h, --help Print help - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --color Coloring: auto, always, never - --frozen Require Cargo.lock and cache are up to date - --locked Require Cargo.lock is up to date - --offline Run without accessing the network - --config Override a configuration value - -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - details Run `cargo help package` for more detailed information. diff --git a/tests/testsuite/cargo_pkgid/help/stdout.log b/tests/testsuite/cargo_pkgid/help/stdout.log index b00a2e9c456f..a137e80c63a9 100644 --- a/tests/testsuite/cargo_pkgid/help/stdout.log +++ b/tests/testsuite/cargo_pkgid/help/stdout.log @@ -7,7 +7,6 @@ Arguments: Options: -q, --quiet Do not print cargo log messages - -p, --package [] Argument to get the package ID specifier for --manifest-path Path to Cargo.toml -h, --help Print help -v, --verbose... Use verbose output (-vv very verbose/build.rs output) @@ -19,4 +18,7 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Package Selection: + -p, --package [] Argument to get the package ID specifier for + Run `cargo help pkgid` for more detailed information. diff --git a/tests/testsuite/cargo_publish/help/stdout.log b/tests/testsuite/cargo_publish/help/stdout.log index 4ed02b0a5be9..8ca4485b74c3 100644 --- a/tests/testsuite/cargo_publish/help/stdout.log +++ b/tests/testsuite/cargo_publish/help/stdout.log @@ -3,30 +3,36 @@ Upload a package to the registry Usage: cargo[EXE] publish [OPTIONS] Options: - -q, --quiet Do not print cargo log messages - --index Registry index URL to upload the package to - --token Token to use when uploading - --no-verify Don't verify the contents by building them - --allow-dirty Allow dirty working directories to be packaged + -q, --quiet Do not print cargo log messages + --index Registry index URL to upload the package to + --token Token to use when uploading + --no-verify Don't verify the contents by building them + --allow-dirty Allow dirty working directories to be packaged + --manifest-path Path to Cargo.toml + -j, --jobs Number of parallel jobs, defaults to # of CPUs. + --keep-going Do not abort the build as soon as there is an error (unstable) + --dry-run Perform all checks without uploading + --registry Registry to publish to + -h, --help Print help + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + --color Coloring: auto, always, never + --frozen Require Cargo.lock and cache are up to date + --locked Require Cargo.lock is up to date + --offline Run without accessing the network + --config Override a configuration value + -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + details + +Compilation Options: --target Build for the target triple --target-dir Directory for all generated artifacts - -p, --package [] Package to publish - --manifest-path Path to Cargo.toml - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature - -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) - --dry-run Perform all checks without uploading - --registry Registry to publish to - -h, --help Print help - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --color Coloring: auto, always, never - --frozen Require Cargo.lock and cache are up to date - --locked Require Cargo.lock is up to date - --offline Run without accessing the network - --config Override a configuration value - -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - details + +Package Selection: + -p, --package [] Package to publish + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature Run `cargo help publish` for more detailed information. diff --git a/tests/testsuite/cargo_remove/help/stdout.log b/tests/testsuite/cargo_remove/help/stdout.log index 1b1c1fa1e30e..f6a4107029f0 100644 --- a/tests/testsuite/cargo_remove/help/stdout.log +++ b/tests/testsuite/cargo_remove/help/stdout.log @@ -6,7 +6,6 @@ Arguments: ... Dependencies to be removed Options: - -p, --package [] Package to remove from --manifest-path Path to Cargo.toml -q, --quiet Do not print cargo log messages --dry-run Don't actually write the manifest @@ -20,6 +19,9 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Package Selection: + -p, --package [] Package to remove from + Section: --dev Remove as development dependency --build Remove as build dependency diff --git a/tests/testsuite/cargo_run/help/stdout.log b/tests/testsuite/cargo_run/help/stdout.log index e48a32edf67f..88a78f553afb 100644 --- a/tests/testsuite/cargo_run/help/stdout.log +++ b/tests/testsuite/cargo_run/help/stdout.log @@ -6,32 +6,40 @@ Arguments: [args]... Arguments for the binary or example to run Options: - -q, --quiet Do not print cargo log messages - --bin [] Name of the bin target to run - --example [] Name of the example target to run - -p, --package [] Package with the target to run - -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + -q, --quiet Do not print cargo log messages + -j, --jobs Number of parallel jobs, defaults to # of CPUs. + --keep-going Do not abort the build as soon as there is an error (unstable) + --manifest-path Path to Cargo.toml + --message-format Error format + --unit-graph Output build graph in JSON (unstable) + --ignore-rust-version Ignore `rust-version` specification in packages + --timings[=] Timing output formats (unstable) (comma separated): html, json + -h, --help Print help + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + --color Coloring: auto, always, never + --frozen Require Cargo.lock and cache are up to date + --locked Require Cargo.lock is up to date + --offline Run without accessing the network + --config Override a configuration value + -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + details + +Target Selection: + --bin [] Name of the bin target to run + --example [] Name of the example target to run + +Package Selection: + -p, --package [] Package with the target to run + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Compilation Options: -r, --release Build artifacts in release mode, with optimizations --profile Build artifacts with the specified profile - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature --target Build for the target triple --target-dir Directory for all generated artifacts - --manifest-path Path to Cargo.toml - --message-format Error format - --unit-graph Output build graph in JSON (unstable) - --ignore-rust-version Ignore `rust-version` specification in packages - --timings[=] Timing output formats (unstable) (comma separated): html, json - -h, --help Print help - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --color Coloring: auto, always, never - --frozen Require Cargo.lock and cache are up to date - --locked Require Cargo.lock is up to date - --offline Run without accessing the network - --config Override a configuration value - -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - details Run `cargo help run` for more detailed information. diff --git a/tests/testsuite/cargo_rustc/help/stdout.log b/tests/testsuite/cargo_rustc/help/stdout.log index 715d68bedf9a..c80f0deae022 100644 --- a/tests/testsuite/cargo_rustc/help/stdout.log +++ b/tests/testsuite/cargo_rustc/help/stdout.log @@ -7,28 +7,10 @@ Arguments: Options: -q, --quiet Do not print cargo log messages - -p, --package [] Package to build -j, --jobs Number of parallel jobs, defaults to # of CPUs. --keep-going Do not abort the build as soon as there is an error (unstable) - --lib Build only this package's library - --bins Build all binaries - --bin [] Build only the specified binary - --examples Build all examples - --example [] Build only the specified example - --tests Build all tests - --test [] Build only the specified test target - --benches Build all benches - --bench [] Build only the specified bench target - --all-targets Build all targets - -r, --release Build artifacts in release mode, with optimizations - --profile Build artifacts with the specified profile - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature - --target Target triple which compiles will be for --print Output compiler information without compiling --crate-type Comma separated list of types of crates for the compiler to emit - --target-dir Directory for all generated artifacts --manifest-path Path to Cargo.toml --message-format Error format --unit-graph Output build graph in JSON (unstable) @@ -45,4 +27,30 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Package Selection: + -p, --package [] Package to build + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Target Selection: + --lib Build only this package's library + --bins Build all binaries + --bin [] Build only the specified binary + --examples Build all examples + --example [] Build only the specified example + --tests Build all tests + --test [] Build only the specified test target + --benches Build all benches + --bench [] Build only the specified bench target + --all-targets Build all targets + +Compilation Options: + -r, --release Build artifacts in release mode, with optimizations + --profile Build artifacts with the specified profile + --target Target triple which compiles will be for + --target-dir Directory for all generated artifacts + Run `cargo help rustc` for more detailed information. diff --git a/tests/testsuite/cargo_rustdoc/help/stdout.log b/tests/testsuite/cargo_rustdoc/help/stdout.log index 54de75091c08..f34f45b0b157 100644 --- a/tests/testsuite/cargo_rustdoc/help/stdout.log +++ b/tests/testsuite/cargo_rustdoc/help/stdout.log @@ -6,41 +6,49 @@ Arguments: [args]... Extra rustdoc flags Options: - -q, --quiet Do not print cargo log messages - --open Opens the docs in a browser after the operation - -p, --package [] Package to document - -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) - --lib Build only this package's library - --bins Build all binaries - --bin [] Build only the specified binary - --examples Build all examples - --example [] Build only the specified example - --tests Build all tests - --test [] Build only the specified test target - --benches Build all benches - --bench [] Build only the specified bench target - --all-targets Build all targets + -q, --quiet Do not print cargo log messages + --open Opens the docs in a browser after the operation + -j, --jobs Number of parallel jobs, defaults to # of CPUs. + --keep-going Do not abort the build as soon as there is an error (unstable) + --manifest-path Path to Cargo.toml + --message-format Error format + --unit-graph Output build graph in JSON (unstable) + --ignore-rust-version Ignore `rust-version` specification in packages + --timings[=] Timing output formats (unstable) (comma separated): html, json + -h, --help Print help + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + --color Coloring: auto, always, never + --frozen Require Cargo.lock and cache are up to date + --locked Require Cargo.lock is up to date + --offline Run without accessing the network + --config Override a configuration value + -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + details + +Package Selection: + -p, --package [] Package to document + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Target Selection: + --lib Build only this package's library + --bins Build all binaries + --bin [] Build only the specified binary + --examples Build all examples + --example [] Build only the specified example + --tests Build all tests + --test [] Build only the specified test target + --benches Build all benches + --bench [] Build only the specified bench target + --all-targets Build all targets + +Compilation Options: -r, --release Build artifacts in release mode, with optimizations --profile Build artifacts with the specified profile - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature --target Build for the target triple --target-dir Directory for all generated artifacts - --manifest-path Path to Cargo.toml - --message-format Error format - --unit-graph Output build graph in JSON (unstable) - --ignore-rust-version Ignore `rust-version` specification in packages - --timings[=] Timing output formats (unstable) (comma separated): html, json - -h, --help Print help - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --color Coloring: auto, always, never - --frozen Require Cargo.lock and cache are up to date - --locked Require Cargo.lock is up to date - --offline Run without accessing the network - --config Override a configuration value - -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - details Run `cargo help rustdoc` for more detailed information. diff --git a/tests/testsuite/cargo_test/help/stdout.log b/tests/testsuite/cargo_test/help/stdout.log index c26eb06197e2..368896ac70ab 100644 --- a/tests/testsuite/cargo_test/help/stdout.log +++ b/tests/testsuite/cargo_test/help/stdout.log @@ -8,32 +8,11 @@ Arguments: Options: -q, --quiet Display one character per test instead of one line - --lib Test only this package's library unit tests - --bins Test all binaries - --bin [] Test only the specified binary - --examples Test all examples - --example [] Test only the specified example - --tests Test all tests - --test [] Test only the specified test target - --benches Test all benches - --bench [] Test only the specified bench target - --all-targets Test all targets --doc Test only this library's documentation --no-run Compile, but don't run tests --no-fail-fast Run all tests regardless of failure - -p, --package [] Package to run tests for - --workspace Test all packages in the workspace - --exclude Exclude packages from the test - --all Alias for --workspace (deprecated) -j, --jobs Number of parallel jobs, defaults to # of CPUs. --keep-going Do not abort the build as soon as there is an error (unstable) - -r, --release Build artifacts in release mode, with optimizations - --profile Build artifacts with the specified profile - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature - --target Build for the target triple - --target-dir Directory for all generated artifacts --manifest-path Path to Cargo.toml --ignore-rust-version Ignore `rust-version` specification in packages --message-format Error format @@ -50,5 +29,34 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Target Selection: + --lib Test only this package's library unit tests + --bins Test all binaries + --bin [] Test only the specified binary + --examples Test all examples + --example [] Test only the specified example + --tests Test all tests + --test [] Test only the specified test target + --benches Test all benches + --bench [] Test only the specified bench target + --all-targets Test all targets + +Package Selection: + -p, --package [] Package to run tests for + --workspace Test all packages in the workspace + --exclude Exclude packages from the test + --all Alias for --workspace (deprecated) + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Compilation Options: + -r, --release Build artifacts in release mode, with optimizations + --profile Build artifacts with the specified profile + --target Build for the target triple + --target-dir Directory for all generated artifacts + Run `cargo help test` for more detailed information. Run `cargo test -- --help` for test binary options. diff --git a/tests/testsuite/cargo_tree/help/stdout.log b/tests/testsuite/cargo_tree/help/stdout.log index 28723b17b259..197e5177fdea 100644 --- a/tests/testsuite/cargo_tree/help/stdout.log +++ b/tests/testsuite/cargo_tree/help/stdout.log @@ -5,14 +5,6 @@ Usage: cargo[EXE] tree [OPTIONS] Options: -q, --quiet Do not print cargo log messages --manifest-path Path to Cargo.toml - -p, --package [] Package to be used as the root of the tree - --workspace Display the tree for all packages in the workspace - --exclude Exclude specific workspace members - -F, --features Space or comma separated list of features to activate - --all-features Activate all available features - --no-default-features Do not activate the `default` feature - --target Filter dependencies matching the given target-triple (default host - platform). Pass `all` to include all targets. -e, --edges The kinds of dependencies to display (features, normal, build, dev, all, no-normal, no-build, no-dev, no-proc-macro) -i, --invert [] Invert the tree direction and focus on the given package @@ -35,4 +27,18 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Package Selection: + -p, --package [] Package to be used as the root of the tree + --workspace Display the tree for all packages in the workspace + --exclude Exclude specific workspace members + +Feature Selection: + -F, --features Space or comma separated list of features to activate + --all-features Activate all available features + --no-default-features Do not activate the `default` feature + +Compilation Options: + --target Filter dependencies matching the given target-triple (default host + platform). Pass `all` to include all targets. + Run `cargo help tree` for more detailed information. diff --git a/tests/testsuite/cargo_uninstall/help/stdout.log b/tests/testsuite/cargo_uninstall/help/stdout.log index f12662702506..d59bb6da707d 100644 --- a/tests/testsuite/cargo_uninstall/help/stdout.log +++ b/tests/testsuite/cargo_uninstall/help/stdout.log @@ -7,7 +7,6 @@ Arguments: Options: -q, --quiet Do not print cargo log messages - -p, --package [] Package to uninstall --bin Only uninstall the binary NAME --root Directory to uninstall packages from -h, --help Print help @@ -19,4 +18,7 @@ Options: --config Override a configuration value -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Package Selection: + -p, --package [] Package to uninstall + Run `cargo help uninstall` for more detailed information. diff --git a/tests/testsuite/cargo_update/help/stdout.log b/tests/testsuite/cargo_update/help/stdout.log index 46b83f32a287..720d34f7175d 100644 --- a/tests/testsuite/cargo_update/help/stdout.log +++ b/tests/testsuite/cargo_update/help/stdout.log @@ -5,7 +5,6 @@ Usage: cargo[EXE] update [OPTIONS] Options: -q, --quiet Do not print cargo log messages -w, --workspace Only update the workspace packages - -p, --package [] Package to update --aggressive Force updating all dependencies of SPEC as well when used with -p --dry-run Don't actually write the lockfile --precise Update a single dependency to exactly PRECISE when used with -p @@ -20,4 +19,7 @@ Options: -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details +Package Selection: + -p, --package [] Package to update + Run `cargo help update` for more detailed information.