diff --git a/src/bin/cargo/cli.rs b/src/bin/cargo/cli.rs index 4a1e24e0f..a21c7288c 100644 --- a/src/bin/cargo/cli.rs +++ b/src/bin/cargo/cli.rs @@ -633,9 +633,11 @@ See 'cargo help <>' for more information on a sp ) .arg(flag("quiet", "Do not print cargo log messages").short('q').global(true)) .arg( - opt("color", "Coloring: auto, always, never") + opt("color", "Coloring") .value_name("WHEN") - .global(true), + .global(true) + .value_parser(["auto", "always", "never"]) + .ignore_case(true), ) .arg( Arg::new("directory") diff --git a/src/bin/cargo/commands/locate_project.rs b/src/bin/cargo/commands/locate_project.rs index d38d70c0f..439f2d579 100644 --- a/src/bin/cargo/commands/locate_project.rs +++ b/src/bin/cargo/commands/locate_project.rs @@ -8,11 +8,10 @@ pub fn cli() -> Command { .about("Print a JSON representation of a Cargo.toml file's location") .arg(flag("workspace", "Locate Cargo.toml of the workspace root")) .arg( - opt( - "message-format", - "Output representation [possible values: json, plain]", - ) - .value_name("FMT"), + opt("message-format", "Output representation") + .value_name("FMT") + .value_parser(["json", "plain"]) + .ignore_case(true), ) .arg_silent_suggestion() .arg_manifest_path() diff --git a/src/cargo/util/command_prelude.rs b/src/cargo/util/command_prelude.rs index 0b11ac4f0..78dde6196 100644 --- a/src/cargo/util/command_prelude.rs +++ b/src/cargo/util/command_prelude.rs @@ -361,7 +361,19 @@ pub trait CommandExt: Sized { } fn arg_message_format(self) -> Self { - self._arg(multi_opt("message-format", "FMT", "Error format")) + self._arg( + multi_opt("message-format", "FMT", "Error format") + .value_parser([ + "human", + "short", + "json", + "json-diagnostic-short", + "json-diagnostic-rendered-ansi", + "json-render-diagnostics", + ]) + .value_delimiter(',') + .ignore_case(true), + ) } fn arg_build_plan(self) -> Self { diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 7b42090e9..b37ae9fc6 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -4066,9 +4066,12 @@ fn wrong_message_format_option() { .build(); p.cargo("build --message-format XML") - .with_status(101) + .with_status(1) .with_stderr_data(str![[r#" -[ERROR] invalid message format specifier: `xml` +[ERROR] invalid value 'XML' for '--message-format ' + [possible values: human, short, json, json-diagnostic-short, json-diagnostic-rendered-ansi, json-render-diagnostics] + +For more information, try '--help'. "#]]) .run(); diff --git a/tests/testsuite/cargo/help/stdout.term.svg b/tests/testsuite/cargo/help/stdout.term.svg index 1f85d9915..65f66ac85 100644 --- a/tests/testsuite/cargo/help/stdout.term.svg +++ b/tests/testsuite/cargo/help/stdout.term.svg @@ -41,7 +41,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] -C <DIRECTORY> Change to DIRECTORY before doing anything (nightly-only) diff --git a/tests/testsuite/cargo_add/help/stdout.term.svg b/tests/testsuite/cargo_add/help/stdout.term.svg index 9309e91ec..652897487 100644 --- a/tests/testsuite/cargo_add/help/stdout.term.svg +++ b/tests/testsuite/cargo_add/help/stdout.term.svg @@ -1,4 +1,4 @@ - + --color <WHEN> - Coloring: auto, always, never + Coloring - + - --config <KEY=VALUE|PATH> + [possible values: auto, always, never] - Override a configuration value + - + --config <KEY=VALUE|PATH> - -Z <FLAG> + Override a configuration value - Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details + - + -Z <FLAG> - -h, --help + Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details - Print help (see a summary with '-h') + - + -h, --help - Manifest Options: + Print help (see a summary with '-h') - --manifest-path <PATH> + - Path to Cargo.toml + Manifest Options: - + --manifest-path <PATH> - --lockfile-path <PATH> + Path to Cargo.toml - Path to Cargo.lock (unstable) + - + --lockfile-path <PATH> - --ignore-rust-version + Path to Cargo.lock (unstable) - Ignore `rust-version` specification in packages + - + --ignore-rust-version - --locked + Ignore `rust-version` specification in packages - Assert that `Cargo.lock` will remain unchanged + - + --locked - --offline + Assert that `Cargo.lock` will remain unchanged - Run without accessing the network + - + --offline - --frozen + Run without accessing the network - Equivalent to specifying both --locked and --offline + - + --frozen - Package Selection: + Equivalent to specifying both --locked and --offline - -p, --package [<SPEC>] + - Package to modify + Package Selection: - + -p, --package [<SPEC>] - Source: + Package to modify - --path <PATH> + - Filesystem path to local crate to add + Source: - + --path <PATH> - --base <BASE> + Filesystem path to local crate to add - The path base to use when adding from a local crate (unstable). + - + --base <BASE> - --git <URI> + The path base to use when adding from a local crate (unstable). - Git repository location + - + --git <URI> - Without any other information, cargo will use latest commit on the main branch. + Git repository location - + - --branch <BRANCH> + Without any other information, cargo will use latest commit on the main branch. - Git branch to download the crate from + - + --branch <BRANCH> - --tag <TAG> + Git branch to download the crate from - Git tag to download the crate from + - + --tag <TAG> - --rev <REV> + Git tag to download the crate from - Git reference to download the crate from + - + --rev <REV> - This is the catch all, handling hashes to named references in remote repositories. + Git reference to download the crate from - + - --registry <NAME> + This is the catch all, handling hashes to named references in remote repositories. - Package registry for this dependency + - + --registry <NAME> - Section: + Package registry for this dependency - --dev + - Add as development dependency + Section: - + --dev - Dev-dependencies are not used when compiling a package for building, but are used for + Add as development dependency - compiling tests, examples, and benchmarks. + - + Dev-dependencies are not used when compiling a package for building, but are used for - These dependencies are not propagated to other packages which depend on this package. + compiling tests, examples, and benchmarks. - + - --build + These dependencies are not propagated to other packages which depend on this package. - Add as build dependency + - + --build - Build-dependencies are the only dependencies available for use by build scripts + Add as build dependency - (`build.rs` files). + - + Build-dependencies are the only dependencies available for use by build scripts - --target <TARGET> + (`build.rs` files). - Add as dependency to the given target platform + - + --target <TARGET> - Run `cargo help add` for more detailed information. + Add as dependency to the given target platform + + Run `cargo help add` for more detailed information. + + diff --git a/tests/testsuite/cargo_bench/help/stdout.term.svg b/tests/testsuite/cargo_bench/help/stdout.term.svg index 74ef89cfb..5d54ea549 100644 --- a/tests/testsuite/cargo_bench/help/stdout.term.svg +++ b/tests/testsuite/cargo_bench/help/stdout.term.svg @@ -1,4 +1,4 @@ - + --no-fail-fast Run all benchmarks regardless of failure - --message-format <FMT> Error format + --message-format <FMT> Error format [possible values: human, short, json, - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + json-diagnostic-short, json-diagnostic-rendered-ansi, - -q, --quiet Do not print cargo log messages + json-render-diagnostics] - --color <WHEN> Coloring: auto, always, never + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --config <KEY=VALUE|PATH> Override a configuration value + -q, --quiet Do not print cargo log messages - -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + --color <WHEN> Coloring [possible values: auto, always, never] - details + --config <KEY=VALUE|PATH> Override a configuration value - -h, --help Print help + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - + details - Package Selection: + -h, --help Print help - -p, --package [<SPEC>] Package to run benchmarks for + - --workspace Benchmark all packages in the workspace + Package Selection: - --exclude <SPEC> Exclude packages from the benchmark + -p, --package [<SPEC>] Package to run benchmarks for - --all Alias for --workspace (deprecated) + --workspace Benchmark all packages in the workspace - + --exclude <SPEC> Exclude packages from the benchmark - Target Selection: + --all Alias for --workspace (deprecated) - --lib Benchmark only this package's library + - --bins Benchmark all binaries + Target Selection: - --bin [<NAME>] Benchmark only the specified binary + --lib Benchmark only this package's library - --examples Benchmark all examples + --bins Benchmark all binaries - --example [<NAME>] Benchmark only the specified example + --bin [<NAME>] Benchmark only the specified binary - --tests Benchmark all targets that have `test = true` set + --examples Benchmark all examples - --test [<NAME>] Benchmark only the specified test target + --example [<NAME>] Benchmark only the specified example - --benches Benchmark all targets that have `bench = true` set + --tests Benchmark all targets that have `test = true` set - --bench [<NAME>] Benchmark only the specified bench target + --test [<NAME>] Benchmark only the specified test target - --all-targets Benchmark all targets + --benches Benchmark all targets that have `bench = true` set - + --bench [<NAME>] Benchmark only the specified bench target - Feature Selection: + --all-targets Benchmark all targets - -F, --features <FEATURES> Space or comma separated list of features to activate + - --all-features Activate all available features + Feature Selection: - --no-default-features Do not activate the `default` feature + -F, --features <FEATURES> Space or comma separated list of features to activate - + --all-features Activate all available features - Compilation Options: + --no-default-features Do not activate the `default` feature - -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. + - --profile <PROFILE-NAME> Build artifacts with the specified profile + Compilation Options: - --target [<TRIPLE>] Build for the target triple + -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. - --target-dir <DIRECTORY> Directory for all generated artifacts + --profile <PROFILE-NAME> Build artifacts with the specified profile - --unit-graph Output build graph in JSON (unstable) + --target [<TRIPLE>] Build for the target triple - --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + --target-dir <DIRECTORY> Directory for all generated artifacts - + --unit-graph Output build graph in JSON (unstable) - Manifest Options: + --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json - --manifest-path <PATH> Path to Cargo.toml + - --lockfile-path <PATH> Path to Cargo.lock (unstable) + Manifest Options: - --ignore-rust-version Ignore `rust-version` specification in packages + --manifest-path <PATH> Path to Cargo.toml - --locked Assert that `Cargo.lock` will remain unchanged + --lockfile-path <PATH> Path to Cargo.lock (unstable) - --offline Run without accessing the network + --ignore-rust-version Ignore `rust-version` specification in packages - --frozen Equivalent to specifying both --locked and --offline + --locked Assert that `Cargo.lock` will remain unchanged - + --offline Run without accessing the network - Run `cargo help bench` for more detailed information. + --frozen Equivalent to specifying both --locked and --offline + + Run `cargo help bench` for more detailed information. + + diff --git a/tests/testsuite/cargo_build/help/stdout.term.svg b/tests/testsuite/cargo_build/help/stdout.term.svg index 803fb0638..dcbf192a7 100644 --- a/tests/testsuite/cargo_build/help/stdout.term.svg +++ b/tests/testsuite/cargo_build/help/stdout.term.svg @@ -1,4 +1,4 @@ - + --future-incompat-report Outputs a future incompatibility report at the end of the build - --message-format <FMT> Error format + --message-format <FMT> Error format [possible values: human, short, json, - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + json-diagnostic-short, json-diagnostic-rendered-ansi, - -q, --quiet Do not print cargo log messages + json-render-diagnostics] - --color <WHEN> Coloring: auto, always, never + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --config <KEY=VALUE|PATH> Override a configuration value + -q, --quiet Do not print cargo log messages - -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + --color <WHEN> Coloring [possible values: auto, always, never] - details + --config <KEY=VALUE|PATH> Override a configuration value - -h, --help Print help + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - + details - Package Selection: + -h, --help Print help - -p, --package [<SPEC>] Package to build (see `cargo help pkgid`) + - --workspace Build all packages in the workspace + Package Selection: - --exclude <SPEC> Exclude packages from the build + -p, --package [<SPEC>] Package to build (see `cargo help pkgid`) - --all Alias for --workspace (deprecated) + --workspace Build all packages in the workspace - + --exclude <SPEC> Exclude packages from the build - Target Selection: + --all Alias for --workspace (deprecated) - --lib Build only this package's library + - --bins Build all binaries + Target Selection: - --bin [<NAME>] Build only the specified binary + --lib Build only this package's library - --examples Build all examples + --bins Build all binaries - --example [<NAME>] Build only the specified example + --bin [<NAME>] Build only the specified binary - --tests Build all targets that have `test = true` set + --examples Build all examples - --test [<NAME>] Build only the specified test target + --example [<NAME>] Build only the specified example - --benches Build all targets that have `bench = true` set + --tests Build all targets that have `test = true` set - --bench [<NAME>] Build only the specified bench target + --test [<NAME>] Build only the specified test target - --all-targets Build all targets + --benches Build all targets that have `bench = true` set - + --bench [<NAME>] Build only the specified bench target - Feature Selection: + --all-targets Build all targets - -F, --features <FEATURES> Space or comma separated list of features to activate + - --all-features Activate all available features + Feature Selection: - --no-default-features Do not activate the `default` feature + -F, --features <FEATURES> Space or comma separated list of features to activate - + --all-features Activate all available features - Compilation Options: + --no-default-features Do not activate the `default` feature - -r, --release Build artifacts in release mode, with optimizations + - --profile <PROFILE-NAME> Build artifacts with the specified profile + Compilation Options: - -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. + -r, --release Build artifacts in release mode, with optimizations - --keep-going Do not abort the build as soon as there is an error + --profile <PROFILE-NAME> Build artifacts with the specified profile - --target [<TRIPLE>] Build for the target triple + -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. - --target-dir <DIRECTORY> Directory for all generated artifacts + --keep-going Do not abort the build as soon as there is an error - --artifact-dir <PATH> Copy final artifacts to this directory (unstable) + --target [<TRIPLE>] Build for the target triple - --build-plan Output the build plan in JSON (unstable) + --target-dir <DIRECTORY> Directory for all generated artifacts - --unit-graph Output build graph in JSON (unstable) + --artifact-dir <PATH> Copy final artifacts to this directory (unstable) - --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + --build-plan Output the build plan in JSON (unstable) - + --unit-graph Output build graph in JSON (unstable) - Manifest Options: + --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json - --manifest-path <PATH> Path to Cargo.toml + - --lockfile-path <PATH> Path to Cargo.lock (unstable) + Manifest Options: - --ignore-rust-version Ignore `rust-version` specification in packages + --manifest-path <PATH> Path to Cargo.toml - --locked Assert that `Cargo.lock` will remain unchanged + --lockfile-path <PATH> Path to Cargo.lock (unstable) - --offline Run without accessing the network + --ignore-rust-version Ignore `rust-version` specification in packages - --frozen Equivalent to specifying both --locked and --offline + --locked Assert that `Cargo.lock` will remain unchanged - + --offline Run without accessing the network - Run `cargo help build` for more detailed information. + --frozen Equivalent to specifying both --locked and --offline + + Run `cargo help build` for more detailed information. + + diff --git a/tests/testsuite/cargo_check/help/stdout.term.svg b/tests/testsuite/cargo_check/help/stdout.term.svg index eb5998415..5c07c97cb 100644 --- a/tests/testsuite/cargo_check/help/stdout.term.svg +++ b/tests/testsuite/cargo_check/help/stdout.term.svg @@ -1,4 +1,4 @@ - + --future-incompat-report Outputs a future incompatibility report at the end of the build - --message-format <FMT> Error format + --message-format <FMT> Error format [possible values: human, short, json, - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + json-diagnostic-short, json-diagnostic-rendered-ansi, - -q, --quiet Do not print cargo log messages + json-render-diagnostics] - --color <WHEN> Coloring: auto, always, never + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --config <KEY=VALUE|PATH> Override a configuration value + -q, --quiet Do not print cargo log messages - -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + --color <WHEN> Coloring [possible values: auto, always, never] - details + --config <KEY=VALUE|PATH> Override a configuration value - -h, --help Print help + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - + details - Package Selection: + -h, --help Print help - -p, --package [<SPEC>] Package(s) to check + - --workspace Check all packages in the workspace + Package Selection: - --exclude <SPEC> Exclude packages from the check + -p, --package [<SPEC>] Package(s) to check - --all Alias for --workspace (deprecated) + --workspace Check all packages in the workspace - + --exclude <SPEC> Exclude packages from the check - Target Selection: + --all Alias for --workspace (deprecated) - --lib Check only this package's library + - --bins Check all binaries + Target Selection: - --bin [<NAME>] Check only the specified binary + --lib Check only this package's library - --examples Check all examples + --bins Check all binaries - --example [<NAME>] Check only the specified example + --bin [<NAME>] Check only the specified binary - --tests Check all targets that have `test = true` set + --examples Check all examples - --test [<NAME>] Check only the specified test target + --example [<NAME>] Check only the specified example - --benches Check all targets that have `bench = true` set + --tests Check all targets that have `test = true` set - --bench [<NAME>] Check only the specified bench target + --test [<NAME>] Check only the specified test target - --all-targets Check all targets + --benches Check all targets that have `bench = true` set - + --bench [<NAME>] Check only the specified bench target - Feature Selection: + --all-targets Check all targets - -F, --features <FEATURES> Space or comma separated list of features to activate + - --all-features Activate all available features + Feature Selection: - --no-default-features Do not activate the `default` feature + -F, --features <FEATURES> Space or comma separated list of features to activate - + --all-features Activate all available features - Compilation Options: + --no-default-features Do not activate the `default` feature - -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. + - --keep-going Do not abort the build as soon as there is an error + Compilation Options: - -r, --release Check artifacts in release mode, with optimizations + -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. - --profile <PROFILE-NAME> Check artifacts with the specified profile + --keep-going Do not abort the build as soon as there is an error - --target [<TRIPLE>] Check for the target triple + -r, --release Check artifacts in release mode, with optimizations - --target-dir <DIRECTORY> Directory for all generated artifacts + --profile <PROFILE-NAME> Check artifacts with the specified profile - --unit-graph Output build graph in JSON (unstable) + --target [<TRIPLE>] Check for the target triple - --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + --target-dir <DIRECTORY> Directory for all generated artifacts - + --unit-graph Output build graph in JSON (unstable) - Manifest Options: + --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json - --manifest-path <PATH> Path to Cargo.toml + - --lockfile-path <PATH> Path to Cargo.lock (unstable) + Manifest Options: - --ignore-rust-version Ignore `rust-version` specification in packages + --manifest-path <PATH> Path to Cargo.toml - --locked Assert that `Cargo.lock` will remain unchanged + --lockfile-path <PATH> Path to Cargo.lock (unstable) - --offline Run without accessing the network + --ignore-rust-version Ignore `rust-version` specification in packages - --frozen Equivalent to specifying both --locked and --offline + --locked Assert that `Cargo.lock` will remain unchanged - + --offline Run without accessing the network - Run `cargo help check` for more detailed information. + --frozen Equivalent to specifying both --locked and --offline + + Run `cargo help check` for more detailed information. + + diff --git a/tests/testsuite/cargo_clean/help/stdout.term.svg b/tests/testsuite/cargo_clean/help/stdout.term.svg index 53c4349ba..8b6df0f22 100644 --- a/tests/testsuite/cargo_clean/help/stdout.term.svg +++ b/tests/testsuite/cargo_clean/help/stdout.term.svg @@ -37,7 +37,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_config/help/stdout.term.svg b/tests/testsuite/cargo_config/help/stdout.term.svg index 0ff37d952..5850e448b 100644 --- a/tests/testsuite/cargo_config/help/stdout.term.svg +++ b/tests/testsuite/cargo_config/help/stdout.term.svg @@ -39,7 +39,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_doc/help/stdout.term.svg b/tests/testsuite/cargo_doc/help/stdout.term.svg index 93b7145cb..ffa646f74 100644 --- a/tests/testsuite/cargo_doc/help/stdout.term.svg +++ b/tests/testsuite/cargo_doc/help/stdout.term.svg @@ -1,4 +1,4 @@ - + --document-private-items Document private items - --message-format <FMT> Error format + --message-format <FMT> Error format [possible values: human, short, json, - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + json-diagnostic-short, json-diagnostic-rendered-ansi, - -q, --quiet Do not print cargo log messages + json-render-diagnostics] - --color <WHEN> Coloring: auto, always, never + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --config <KEY=VALUE|PATH> Override a configuration value + -q, --quiet Do not print cargo log messages - -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + --color <WHEN> Coloring [possible values: auto, always, never] - details + --config <KEY=VALUE|PATH> Override a configuration value - -h, --help Print help + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - + details - Package Selection: + -h, --help Print help - -p, --package [<SPEC>] Package to document + - --workspace Document all packages in the workspace + Package Selection: - --exclude <SPEC> Exclude packages from the build + -p, --package [<SPEC>] Package to document - --all Alias for --workspace (deprecated) + --workspace Document all packages in the workspace - + --exclude <SPEC> Exclude packages from the build - Feature Selection: + --all Alias for --workspace (deprecated) - -F, --features <FEATURES> Space or comma separated list of features to activate + - --all-features Activate all available features + Feature Selection: - --no-default-features Do not activate the `default` feature + -F, --features <FEATURES> Space or comma separated list of features to activate - + --all-features Activate all available features - Target Selection: + --no-default-features Do not activate the `default` feature - --lib Document only this package's library + - --bins Document all binaries + Target Selection: - --bin [<NAME>] Document only the specified binary + --lib Document only this package's library - --examples Document all examples + --bins Document all binaries - --example [<NAME>] Document only the specified example + --bin [<NAME>] Document only the specified binary - + --examples Document all examples - Compilation Options: + --example [<NAME>] Document only the specified example - -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. + - --keep-going Do not abort the build as soon as there is an error + Compilation Options: - -r, --release Build artifacts in release mode, with optimizations + -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. - --profile <PROFILE-NAME> Build artifacts with the specified profile + --keep-going Do not abort the build as soon as there is an error - --target [<TRIPLE>] Build for the target triple + -r, --release Build artifacts in release mode, with optimizations - --target-dir <DIRECTORY> Directory for all generated artifacts + --profile <PROFILE-NAME> Build artifacts with the specified profile - --unit-graph Output build graph in JSON (unstable) + --target [<TRIPLE>] Build for the target triple - --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + --target-dir <DIRECTORY> Directory for all generated artifacts - + --unit-graph Output build graph in JSON (unstable) - Manifest Options: + --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json - --manifest-path <PATH> Path to Cargo.toml + - --lockfile-path <PATH> Path to Cargo.lock (unstable) + Manifest Options: - --ignore-rust-version Ignore `rust-version` specification in packages + --manifest-path <PATH> Path to Cargo.toml - --locked Assert that `Cargo.lock` will remain unchanged + --lockfile-path <PATH> Path to Cargo.lock (unstable) - --offline Run without accessing the network + --ignore-rust-version Ignore `rust-version` specification in packages - --frozen Equivalent to specifying both --locked and --offline + --locked Assert that `Cargo.lock` will remain unchanged - + --offline Run without accessing the network - Run `cargo help doc` for more detailed information. + --frozen Equivalent to specifying both --locked and --offline + + Run `cargo help doc` for more detailed information. + + diff --git a/tests/testsuite/cargo_fetch/help/stdout.term.svg b/tests/testsuite/cargo_fetch/help/stdout.term.svg index 2607f4950..2e03e8666 100644 --- a/tests/testsuite/cargo_fetch/help/stdout.term.svg +++ b/tests/testsuite/cargo_fetch/help/stdout.term.svg @@ -33,7 +33,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_fix/help/stdout.term.svg b/tests/testsuite/cargo_fix/help/stdout.term.svg index 1c8609896..0df154363 100644 --- a/tests/testsuite/cargo_fix/help/stdout.term.svg +++ b/tests/testsuite/cargo_fix/help/stdout.term.svg @@ -1,4 +1,4 @@ - + --allow-staged Fix code even if the working directory has staged changes - --message-format <FMT> Error format + --message-format <FMT> Error format [possible values: human, short, json, - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + json-diagnostic-short, json-diagnostic-rendered-ansi, - -q, --quiet Do not print cargo log messages + json-render-diagnostics] - --color <WHEN> Coloring: auto, always, never + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --config <KEY=VALUE|PATH> Override a configuration value + -q, --quiet Do not print cargo log messages - -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + --color <WHEN> Coloring [possible values: auto, always, never] - details + --config <KEY=VALUE|PATH> Override a configuration value - -h, --help Print help + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - + details - Package Selection: + -h, --help Print help - -p, --package [<SPEC>] Package(s) to fix + - --workspace Fix all packages in the workspace + Package Selection: - --exclude <SPEC> Exclude packages from the fixes + -p, --package [<SPEC>] Package(s) to fix - --all Alias for --workspace (deprecated) + --workspace Fix all packages in the workspace - + --exclude <SPEC> Exclude packages from the fixes - Target Selection: + --all Alias for --workspace (deprecated) - --lib Fix only this package's library + - --bins Fix all binaries + Target Selection: - --bin [<NAME>] Fix only the specified binary + --lib Fix only this package's library - --examples Fix all examples + --bins Fix all binaries - --example [<NAME>] Fix only the specified example + --bin [<NAME>] Fix only the specified binary - --tests Fix all targets that have `test = true` set + --examples Fix all examples - --test [<NAME>] Fix only the specified test target + --example [<NAME>] Fix only the specified example - --benches Fix all targets that have `bench = true` set + --tests Fix all targets that have `test = true` set - --bench [<NAME>] Fix only the specified bench target + --test [<NAME>] Fix only the specified test target - --all-targets Fix all targets (default) + --benches Fix all targets that have `bench = true` set - + --bench [<NAME>] Fix only the specified bench target - Feature Selection: + --all-targets Fix all targets (default) - -F, --features <FEATURES> Space or comma separated list of features to activate + - --all-features Activate all available features + Feature Selection: - --no-default-features Do not activate the `default` feature + -F, --features <FEATURES> Space or comma separated list of features to activate - + --all-features Activate all available features - Compilation Options: + --no-default-features Do not activate the `default` feature - -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. + - --keep-going Do not abort the build as soon as there is an error + Compilation Options: - -r, --release Fix artifacts in release mode, with optimizations + -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. - --profile <PROFILE-NAME> Build artifacts with the specified profile + --keep-going Do not abort the build as soon as there is an error - --target [<TRIPLE>] Fix for the target triple + -r, --release Fix artifacts in release mode, with optimizations - --target-dir <DIRECTORY> Directory for all generated artifacts + --profile <PROFILE-NAME> Build artifacts with the specified profile - --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + --target [<TRIPLE>] Fix for the target triple - + --target-dir <DIRECTORY> Directory for all generated artifacts - Manifest Options: + --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json - --manifest-path <PATH> Path to Cargo.toml + - --lockfile-path <PATH> Path to Cargo.lock (unstable) + Manifest Options: - --ignore-rust-version Ignore `rust-version` specification in packages + --manifest-path <PATH> Path to Cargo.toml - --locked Assert that `Cargo.lock` will remain unchanged + --lockfile-path <PATH> Path to Cargo.lock (unstable) - --offline Run without accessing the network + --ignore-rust-version Ignore `rust-version` specification in packages - --frozen Equivalent to specifying both --locked and --offline + --locked Assert that `Cargo.lock` will remain unchanged - + --offline Run without accessing the network - Run `cargo help fix` for more detailed information. + --frozen Equivalent to specifying both --locked and --offline + + Run `cargo help fix` for more detailed information. + + diff --git a/tests/testsuite/cargo_generate_lockfile/help/stdout.term.svg b/tests/testsuite/cargo_generate_lockfile/help/stdout.term.svg index c53b850c1..4656e6591 100644 --- a/tests/testsuite/cargo_generate_lockfile/help/stdout.term.svg +++ b/tests/testsuite/cargo_generate_lockfile/help/stdout.term.svg @@ -33,7 +33,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_help/help/stdout.term.svg b/tests/testsuite/cargo_help/help/stdout.term.svg index 61585e290..17c2cf570 100644 --- a/tests/testsuite/cargo_help/help/stdout.term.svg +++ b/tests/testsuite/cargo_help/help/stdout.term.svg @@ -39,7 +39,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_info/help/stdout.term.svg b/tests/testsuite/cargo_info/help/stdout.term.svg index 7bc930914..3cdd1fcbf 100644 --- a/tests/testsuite/cargo_info/help/stdout.term.svg +++ b/tests/testsuite/cargo_info/help/stdout.term.svg @@ -37,7 +37,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_init/help/stdout.term.svg b/tests/testsuite/cargo_init/help/stdout.term.svg index 3cc1f244c..d6fff110d 100644 --- a/tests/testsuite/cargo_init/help/stdout.term.svg +++ b/tests/testsuite/cargo_init/help/stdout.term.svg @@ -57,7 +57,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_install/help/stdout.term.svg b/tests/testsuite/cargo_install/help/stdout.term.svg index f750a38a6..30d8cab04 100644 --- a/tests/testsuite/cargo_install/help/stdout.term.svg +++ b/tests/testsuite/cargo_install/help/stdout.term.svg @@ -1,4 +1,4 @@ - + --list List all installed packages and their versions - --message-format <FMT> Error format + --message-format <FMT> Error format [possible values: human, short, json, - --debug Build in debug mode (with the 'dev' profile) instead of release + json-diagnostic-short, json-diagnostic-rendered-ansi, - mode + json-render-diagnostics] - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + --debug Build in debug mode (with the 'dev' profile) instead of release - -q, --quiet Do not print cargo log messages + mode - --color <WHEN> Coloring: auto, always, never + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --config <KEY=VALUE|PATH> Override a configuration value + -q, --quiet Do not print cargo log messages - -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + --color <WHEN> Coloring [possible values: auto, always, never] - details + --config <KEY=VALUE|PATH> Override a configuration value - -h, --help Print help + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - + details - Manifest Options: + -h, --help Print help - --ignore-rust-version Ignore `rust-version` specification in packages + - --lockfile-path <PATH> Path to Cargo.lock (unstable) + Manifest Options: - --locked Assert that `Cargo.lock` will remain unchanged + --ignore-rust-version Ignore `rust-version` specification in packages - --offline Run without accessing the network + --lockfile-path <PATH> Path to Cargo.lock (unstable) - --frozen Equivalent to specifying both --locked and --offline + --locked Assert that `Cargo.lock` will remain unchanged - + --offline Run without accessing the network - Target Selection: + --frozen Equivalent to specifying both --locked and --offline - --bin [<NAME>] Install only the specified binary + - --bins Install all binaries + Target Selection: - --example [<NAME>] Install only the specified example + --bin [<NAME>] Install only the specified binary - --examples Install all examples + --bins Install all binaries - + --example [<NAME>] Install only the specified example - Feature Selection: + --examples Install all examples - -F, --features <FEATURES> Space or comma separated list of features to activate + - --all-features Activate all available features + Feature Selection: - --no-default-features Do not activate the `default` feature + -F, --features <FEATURES> Space or comma separated list of features to activate - + --all-features Activate all available features - Compilation Options: + --no-default-features Do not activate the `default` feature - -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. + - --keep-going Do not abort the build as soon as there is an error + Compilation Options: - --profile <PROFILE-NAME> Install artifacts with the specified profile + -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. - --target [<TRIPLE>] Build for the target triple + --keep-going Do not abort the build as soon as there is an error - --target-dir <DIRECTORY> Directory for all generated artifacts + --profile <PROFILE-NAME> Install artifacts with the specified profile - --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + --target [<TRIPLE>] Build for the target triple - + --target-dir <DIRECTORY> Directory for all generated artifacts - Run `cargo help install` for more detailed information. + --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + + Run `cargo help install` for more detailed information. + + diff --git a/tests/testsuite/cargo_locate_project/help/stdout.term.svg b/tests/testsuite/cargo_locate_project/help/stdout.term.svg index 94fc64e58..f1b0aebf8 100644 --- a/tests/testsuite/cargo_locate_project/help/stdout.term.svg +++ b/tests/testsuite/cargo_locate_project/help/stdout.term.svg @@ -37,7 +37,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_login/help/stdout.term.svg b/tests/testsuite/cargo_login/help/stdout.term.svg index a44d055e5..b7ef67243 100644 --- a/tests/testsuite/cargo_login/help/stdout.term.svg +++ b/tests/testsuite/cargo_login/help/stdout.term.svg @@ -41,7 +41,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_logout/help/stdout.term.svg b/tests/testsuite/cargo_logout/help/stdout.term.svg index 19f0047f9..f75995785 100644 --- a/tests/testsuite/cargo_logout/help/stdout.term.svg +++ b/tests/testsuite/cargo_logout/help/stdout.term.svg @@ -35,7 +35,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_metadata/help/stdout.term.svg b/tests/testsuite/cargo_metadata/help/stdout.term.svg index 5cde86fb6..6d53daef9 100644 --- a/tests/testsuite/cargo_metadata/help/stdout.term.svg +++ b/tests/testsuite/cargo_metadata/help/stdout.term.svg @@ -43,7 +43,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_new/help/stdout.term.svg b/tests/testsuite/cargo_new/help/stdout.term.svg index 0b9a8c60c..1985d04e7 100644 --- a/tests/testsuite/cargo_new/help/stdout.term.svg +++ b/tests/testsuite/cargo_new/help/stdout.term.svg @@ -57,7 +57,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_owner/help/stdout.term.svg b/tests/testsuite/cargo_owner/help/stdout.term.svg index 10a9819dd..3ab78e173 100644 --- a/tests/testsuite/cargo_owner/help/stdout.term.svg +++ b/tests/testsuite/cargo_owner/help/stdout.term.svg @@ -51,7 +51,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_package/help/stdout.term.svg b/tests/testsuite/cargo_package/help/stdout.term.svg index 0e301a216..488047310 100644 --- a/tests/testsuite/cargo_package/help/stdout.term.svg +++ b/tests/testsuite/cargo_package/help/stdout.term.svg @@ -47,7 +47,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_pkgid/help/stdout.term.svg b/tests/testsuite/cargo_pkgid/help/stdout.term.svg index d00cd2644..0c1154420 100644 --- a/tests/testsuite/cargo_pkgid/help/stdout.term.svg +++ b/tests/testsuite/cargo_pkgid/help/stdout.term.svg @@ -39,7 +39,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_publish/help/stdout.term.svg b/tests/testsuite/cargo_publish/help/stdout.term.svg index 40981eb68..aaeaf9d03 100644 --- a/tests/testsuite/cargo_publish/help/stdout.term.svg +++ b/tests/testsuite/cargo_publish/help/stdout.term.svg @@ -45,7 +45,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_read_manifest/help/stdout.term.svg b/tests/testsuite/cargo_read_manifest/help/stdout.term.svg index 6fa71ca6b..2af6837a2 100644 --- a/tests/testsuite/cargo_read_manifest/help/stdout.term.svg +++ b/tests/testsuite/cargo_read_manifest/help/stdout.term.svg @@ -37,7 +37,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_remove/help/stdout.term.svg b/tests/testsuite/cargo_remove/help/stdout.term.svg index 0a4cfb8db..dcf6f36dd 100644 --- a/tests/testsuite/cargo_remove/help/stdout.term.svg +++ b/tests/testsuite/cargo_remove/help/stdout.term.svg @@ -41,7 +41,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_report/help/stdout.term.svg b/tests/testsuite/cargo_report/help/stdout.term.svg index e63f6c624..6f4255bce 100644 --- a/tests/testsuite/cargo_report/help/stdout.term.svg +++ b/tests/testsuite/cargo_report/help/stdout.term.svg @@ -39,7 +39,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_run/help/stdout.term.svg b/tests/testsuite/cargo_run/help/stdout.term.svg index d17ad3e4b..9a672b62f 100644 --- a/tests/testsuite/cargo_run/help/stdout.term.svg +++ b/tests/testsuite/cargo_run/help/stdout.term.svg @@ -1,4 +1,4 @@ - + Options: - --message-format <FMT> Error format + --message-format <FMT> Error format [possible values: human, short, json, - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + json-diagnostic-short, json-diagnostic-rendered-ansi, - -q, --quiet Do not print cargo log messages + json-render-diagnostics] - --color <WHEN> Coloring: auto, always, never + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --config <KEY=VALUE|PATH> Override a configuration value + -q, --quiet Do not print cargo log messages - -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + --color <WHEN> Coloring [possible values: auto, always, never] - details + --config <KEY=VALUE|PATH> Override a configuration value - -h, --help Print help + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - + details - Package Selection: + -h, --help Print help - -p, --package [<SPEC>] Package with the target to run + - + Package Selection: - Target Selection: + -p, --package [<SPEC>] Package with the target to run - --bin [<NAME>] Name of the bin target to run + - --example [<NAME>] Name of the example target to run + Target Selection: - + --bin [<NAME>] Name of the bin target to run - Feature Selection: + --example [<NAME>] Name of the example target to run - -F, --features <FEATURES> Space or comma separated list of features to activate + - --all-features Activate all available features + Feature Selection: - --no-default-features Do not activate the `default` feature + -F, --features <FEATURES> Space or comma separated list of features to activate - + --all-features Activate all available features - Compilation Options: + --no-default-features Do not activate the `default` feature - -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. + - --keep-going Do not abort the build as soon as there is an error + Compilation Options: - -r, --release Build artifacts in release mode, with optimizations + -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. - --profile <PROFILE-NAME> Build artifacts with the specified profile + --keep-going Do not abort the build as soon as there is an error - --target [<TRIPLE>] Build for the target triple + -r, --release Build artifacts in release mode, with optimizations - --target-dir <DIRECTORY> Directory for all generated artifacts + --profile <PROFILE-NAME> Build artifacts with the specified profile - --unit-graph Output build graph in JSON (unstable) + --target [<TRIPLE>] Build for the target triple - --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + --target-dir <DIRECTORY> Directory for all generated artifacts - + --unit-graph Output build graph in JSON (unstable) - Manifest Options: + --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json - --manifest-path <PATH> Path to Cargo.toml + - --lockfile-path <PATH> Path to Cargo.lock (unstable) + Manifest Options: - --ignore-rust-version Ignore `rust-version` specification in packages + --manifest-path <PATH> Path to Cargo.toml - --locked Assert that `Cargo.lock` will remain unchanged + --lockfile-path <PATH> Path to Cargo.lock (unstable) - --offline Run without accessing the network + --ignore-rust-version Ignore `rust-version` specification in packages - --frozen Equivalent to specifying both --locked and --offline + --locked Assert that `Cargo.lock` will remain unchanged - + --offline Run without accessing the network - Run `cargo help run` for more detailed information. + --frozen Equivalent to specifying both --locked and --offline + + Run `cargo help run` for more detailed information. + + diff --git a/tests/testsuite/cargo_rustc/help/stdout.term.svg b/tests/testsuite/cargo_rustc/help/stdout.term.svg index 9d77fd23e..1f6bd1157 100644 --- a/tests/testsuite/cargo_rustc/help/stdout.term.svg +++ b/tests/testsuite/cargo_rustc/help/stdout.term.svg @@ -1,4 +1,4 @@ - + --future-incompat-report Outputs a future incompatibility report at the end of the build - --message-format <FMT> Error format + --message-format <FMT> Error format [possible values: human, short, json, - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + json-diagnostic-short, json-diagnostic-rendered-ansi, - -q, --quiet Do not print cargo log messages + json-render-diagnostics] - --color <WHEN> Coloring: auto, always, never + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --config <KEY=VALUE|PATH> Override a configuration value + -q, --quiet Do not print cargo log messages - -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + --color <WHEN> Coloring [possible values: auto, always, never] - details + --config <KEY=VALUE|PATH> Override a configuration value - -h, --help Print help + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - + details - Package Selection: + -h, --help Print help - -p, --package [<SPEC>] Package to build + - + Package Selection: - Target Selection: + -p, --package [<SPEC>] Package to build - --lib Build only this package's library + - --bins Build all binaries + Target Selection: - --bin [<NAME>] Build only the specified binary + --lib Build only this package's library - --examples Build all examples + --bins Build all binaries - --example [<NAME>] Build only the specified example + --bin [<NAME>] Build only the specified binary - --tests Build all targets that have `test = true` set + --examples Build all examples - --test [<NAME>] Build only the specified test target + --example [<NAME>] Build only the specified example - --benches Build all targets that have `bench = true` set + --tests Build all targets that have `test = true` set - --bench [<NAME>] Build only the specified bench target + --test [<NAME>] Build only the specified test target - --all-targets Build all targets + --benches Build all targets that have `bench = true` set - + --bench [<NAME>] Build only the specified bench target - Feature Selection: + --all-targets Build all targets - -F, --features <FEATURES> Space or comma separated list of features to activate + - --all-features Activate all available features + Feature Selection: - --no-default-features Do not activate the `default` feature + -F, --features <FEATURES> Space or comma separated list of features to activate - + --all-features Activate all available features - Compilation Options: + --no-default-features Do not activate the `default` feature - -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. + - --keep-going Do not abort the build as soon as there is an error + Compilation Options: - -r, --release Build artifacts in release mode, with optimizations + -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. - --profile <PROFILE-NAME> Build artifacts with the specified profile + --keep-going Do not abort the build as soon as there is an error - --target [<TRIPLE>] Target triple which compiles will be for + -r, --release Build artifacts in release mode, with optimizations - --target-dir <DIRECTORY> Directory for all generated artifacts + --profile <PROFILE-NAME> Build artifacts with the specified profile - --unit-graph Output build graph in JSON (unstable) + --target [<TRIPLE>] Target triple which compiles will be for - --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + --target-dir <DIRECTORY> Directory for all generated artifacts - + --unit-graph Output build graph in JSON (unstable) - Manifest Options: + --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json - --manifest-path <PATH> Path to Cargo.toml + - --lockfile-path <PATH> Path to Cargo.lock (unstable) + Manifest Options: - --ignore-rust-version Ignore `rust-version` specification in packages + --manifest-path <PATH> Path to Cargo.toml - --locked Assert that `Cargo.lock` will remain unchanged + --lockfile-path <PATH> Path to Cargo.lock (unstable) - --offline Run without accessing the network + --ignore-rust-version Ignore `rust-version` specification in packages - --frozen Equivalent to specifying both --locked and --offline + --locked Assert that `Cargo.lock` will remain unchanged - + --offline Run without accessing the network - Run `cargo help rustc` for more detailed information. + --frozen Equivalent to specifying both --locked and --offline + + Run `cargo help rustc` for more detailed information. + + diff --git a/tests/testsuite/cargo_rustdoc/help/stdout.term.svg b/tests/testsuite/cargo_rustdoc/help/stdout.term.svg index 3b8093128..82112b5a6 100644 --- a/tests/testsuite/cargo_rustdoc/help/stdout.term.svg +++ b/tests/testsuite/cargo_rustdoc/help/stdout.term.svg @@ -1,4 +1,4 @@ - + --open Opens the docs in a browser after the operation - --message-format <FMT> Error format + --message-format <FMT> Error format [possible values: human, short, json, - --output-format <FMT> The output type to write (unstable) [possible values: html, json] + json-diagnostic-short, json-diagnostic-rendered-ansi, - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + json-render-diagnostics] - -q, --quiet Do not print cargo log messages + --output-format <FMT> The output type to write (unstable) [possible values: html, json] - --color <WHEN> Coloring: auto, always, never + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - --config <KEY=VALUE|PATH> Override a configuration value + -q, --quiet Do not print cargo log messages - -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + --color <WHEN> Coloring [possible values: auto, always, never] - details + --config <KEY=VALUE|PATH> Override a configuration value - -h, --help Print help + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - + details - Package Selection: + -h, --help Print help - -p, --package [<SPEC>] Package to document + - + Package Selection: - Target Selection: + -p, --package [<SPEC>] Package to document - --lib Build only this package's library + - --bins Build all binaries + Target Selection: - --bin [<NAME>] Build only the specified binary + --lib Build only this package's library - --examples Build all examples + --bins Build all binaries - --example [<NAME>] Build only the specified example + --bin [<NAME>] Build only the specified binary - --tests Build all targets that have `test = true` set + --examples Build all examples - --test [<NAME>] Build only the specified test target + --example [<NAME>] Build only the specified example - --benches Build all targets that have `bench = true` set + --tests Build all targets that have `test = true` set - --bench [<NAME>] Build only the specified bench target + --test [<NAME>] Build only the specified test target - --all-targets Build all targets + --benches Build all targets that have `bench = true` set - + --bench [<NAME>] Build only the specified bench target - Feature Selection: + --all-targets Build all targets - -F, --features <FEATURES> Space or comma separated list of features to activate + - --all-features Activate all available features + Feature Selection: - --no-default-features Do not activate the `default` feature + -F, --features <FEATURES> Space or comma separated list of features to activate - + --all-features Activate all available features - Compilation Options: + --no-default-features Do not activate the `default` feature - -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. + - --keep-going Do not abort the build as soon as there is an error + Compilation Options: - -r, --release Build artifacts in release mode, with optimizations + -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. - --profile <PROFILE-NAME> Build artifacts with the specified profile + --keep-going Do not abort the build as soon as there is an error - --target [<TRIPLE>] Build for the target triple + -r, --release Build artifacts in release mode, with optimizations - --target-dir <DIRECTORY> Directory for all generated artifacts + --profile <PROFILE-NAME> Build artifacts with the specified profile - --unit-graph Output build graph in JSON (unstable) + --target [<TRIPLE>] Build for the target triple - --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + --target-dir <DIRECTORY> Directory for all generated artifacts - + --unit-graph Output build graph in JSON (unstable) - Manifest Options: + --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json - --manifest-path <PATH> Path to Cargo.toml + - --lockfile-path <PATH> Path to Cargo.lock (unstable) + Manifest Options: - --ignore-rust-version Ignore `rust-version` specification in packages + --manifest-path <PATH> Path to Cargo.toml - --locked Assert that `Cargo.lock` will remain unchanged + --lockfile-path <PATH> Path to Cargo.lock (unstable) - --offline Run without accessing the network + --ignore-rust-version Ignore `rust-version` specification in packages - --frozen Equivalent to specifying both --locked and --offline + --locked Assert that `Cargo.lock` will remain unchanged - + --offline Run without accessing the network - Run `cargo help rustdoc` for more detailed information. + --frozen Equivalent to specifying both --locked and --offline + + Run `cargo help rustdoc` for more detailed information. + + diff --git a/tests/testsuite/cargo_search/help/stdout.term.svg b/tests/testsuite/cargo_search/help/stdout.term.svg index cbad58bcc..88b1a3ecf 100644 --- a/tests/testsuite/cargo_search/help/stdout.term.svg +++ b/tests/testsuite/cargo_search/help/stdout.term.svg @@ -45,7 +45,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_test/help/stdout.term.svg b/tests/testsuite/cargo_test/help/stdout.term.svg index a3bd4b09c..a244b3ab7 100644 --- a/tests/testsuite/cargo_test/help/stdout.term.svg +++ b/tests/testsuite/cargo_test/help/stdout.term.svg @@ -1,4 +1,4 @@ - + --future-incompat-report Outputs a future incompatibility report at the end of the build - --message-format <FMT> Error format + --message-format <FMT> Error format [possible values: human, short, json, - -q, --quiet Display one character per test instead of one line + json-diagnostic-short, json-diagnostic-rendered-ansi, - -v, --verbose... Use verbose output (-vv very verbose/build.rs output) + json-render-diagnostics] - --color <WHEN> Coloring: auto, always, never + -q, --quiet Display one character per test instead of one line - --config <KEY=VALUE|PATH> Override a configuration value + -v, --verbose... Use verbose output (-vv very verbose/build.rs output) - -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for + --color <WHEN> Coloring [possible values: auto, always, never] - details + --config <KEY=VALUE|PATH> Override a configuration value - -h, --help Print help + -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for - + details - Package Selection: + -h, --help Print help - -p, --package [<SPEC>] Package to run tests for + - --workspace Test all packages in the workspace + Package Selection: - --exclude <SPEC> Exclude packages from the test + -p, --package [<SPEC>] Package to run tests for - --all Alias for --workspace (deprecated) + --workspace Test all packages in the workspace - + --exclude <SPEC> Exclude packages from the test - Target Selection: + --all Alias for --workspace (deprecated) - --lib Test only this package's library + - --bins Test all binaries + Target Selection: - --bin [<NAME>] Test only the specified binary + --lib Test only this package's library - --examples Test all examples + --bins Test all binaries - --example [<NAME>] Test only the specified example + --bin [<NAME>] Test only the specified binary - --tests Test all targets that have `test = true` set + --examples Test all examples - --test [<NAME>] Test only the specified test target + --example [<NAME>] Test only the specified example - --benches Test all targets that have `bench = true` set + --tests Test all targets that have `test = true` set - --bench [<NAME>] Test only the specified bench target + --test [<NAME>] Test only the specified test target - --all-targets Test all targets (does not include doctests) + --benches Test all targets that have `bench = true` set - --doc Test only this library's documentation + --bench [<NAME>] Test only the specified bench target - + --all-targets Test all targets (does not include doctests) - Feature Selection: + --doc Test only this library's documentation - -F, --features <FEATURES> Space or comma separated list of features to activate + - --all-features Activate all available features + Feature Selection: - --no-default-features Do not activate the `default` feature + -F, --features <FEATURES> Space or comma separated list of features to activate - + --all-features Activate all available features - Compilation Options: + --no-default-features Do not activate the `default` feature - -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. + - -r, --release Build artifacts in release mode, with optimizations + Compilation Options: - --profile <PROFILE-NAME> Build artifacts with the specified profile + -j, --jobs <N> Number of parallel jobs, defaults to # of CPUs. - --target [<TRIPLE>] Build for the target triple + -r, --release Build artifacts in release mode, with optimizations - --target-dir <DIRECTORY> Directory for all generated artifacts + --profile <PROFILE-NAME> Build artifacts with the specified profile - --unit-graph Output build graph in JSON (unstable) + --target [<TRIPLE>] Build for the target triple - --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json + --target-dir <DIRECTORY> Directory for all generated artifacts - + --unit-graph Output build graph in JSON (unstable) - Manifest Options: + --timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json - --manifest-path <PATH> Path to Cargo.toml + - --lockfile-path <PATH> Path to Cargo.lock (unstable) + Manifest Options: - --ignore-rust-version Ignore `rust-version` specification in packages + --manifest-path <PATH> Path to Cargo.toml - --locked Assert that `Cargo.lock` will remain unchanged + --lockfile-path <PATH> Path to Cargo.lock (unstable) - --offline Run without accessing the network + --ignore-rust-version Ignore `rust-version` specification in packages - --frozen Equivalent to specifying both --locked and --offline + --locked Assert that `Cargo.lock` will remain unchanged - + --offline Run without accessing the network - Run `cargo help test` for more detailed information. + --frozen Equivalent to specifying both --locked and --offline - Run `cargo test -- --help` for test binary options. + - + 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.term.svg b/tests/testsuite/cargo_tree/help/stdout.term.svg index b06f8f1e5..04621079e 100644 --- a/tests/testsuite/cargo_tree/help/stdout.term.svg +++ b/tests/testsuite/cargo_tree/help/stdout.term.svg @@ -55,7 +55,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_uninstall/help/stdout.term.svg b/tests/testsuite/cargo_uninstall/help/stdout.term.svg index b8a3f8024..f89a9a68b 100644 --- a/tests/testsuite/cargo_uninstall/help/stdout.term.svg +++ b/tests/testsuite/cargo_uninstall/help/stdout.term.svg @@ -41,7 +41,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_update/help/stdout.term.svg b/tests/testsuite/cargo_update/help/stdout.term.svg index dd0343c96..42529ea2e 100644 --- a/tests/testsuite/cargo_update/help/stdout.term.svg +++ b/tests/testsuite/cargo_update/help/stdout.term.svg @@ -41,7 +41,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_vendor/help/stdout.term.svg b/tests/testsuite/cargo_vendor/help/stdout.term.svg index 43355fb02..090893484 100644 --- a/tests/testsuite/cargo_vendor/help/stdout.term.svg +++ b/tests/testsuite/cargo_vendor/help/stdout.term.svg @@ -47,7 +47,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_verify_project/help/stdout.term.svg b/tests/testsuite/cargo_verify_project/help/stdout.term.svg index 130db5c53..15e392949 100644 --- a/tests/testsuite/cargo_verify_project/help/stdout.term.svg +++ b/tests/testsuite/cargo_verify_project/help/stdout.term.svg @@ -37,7 +37,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_version/help/stdout.term.svg b/tests/testsuite/cargo_version/help/stdout.term.svg index 8d9ddb8e1..5c0015d78 100644 --- a/tests/testsuite/cargo_version/help/stdout.term.svg +++ b/tests/testsuite/cargo_version/help/stdout.term.svg @@ -33,7 +33,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/cargo_yank/help/stdout.term.svg b/tests/testsuite/cargo_yank/help/stdout.term.svg index 8b006ed25..9ecd0597f 100644 --- a/tests/testsuite/cargo_yank/help/stdout.term.svg +++ b/tests/testsuite/cargo_yank/help/stdout.term.svg @@ -49,7 +49,7 @@ -q, --quiet Do not print cargo log messages - --color <WHEN> Coloring: auto, always, never + --color <WHEN> Coloring [possible values: auto, always, never] --config <KEY=VALUE|PATH> Override a configuration value diff --git a/tests/testsuite/locate_project.rs b/tests/testsuite/locate_project.rs index c6d91a30a..de01210d1 100644 --- a/tests/testsuite/locate_project.rs +++ b/tests/testsuite/locate_project.rs @@ -44,10 +44,13 @@ fn message_format() { p.cargo("locate-project --message-format cryptic") .with_stderr_data(str![[r#" -[ERROR] invalid message format specifier: `cryptic` +[ERROR] invalid value 'cryptic' for '--message-format ' + [possible values: json, plain] + +For more information, try '--help'. "#]]) - .with_status(101) + .with_status(1) .run(); }