diff --git a/src/cargo/util/command_prelude.rs b/src/cargo/util/command_prelude.rs index fa1d18c3e3c..635a2b17552 100644 --- a/src/cargo/util/command_prelude.rs +++ b/src/cargo/util/command_prelude.rs @@ -239,7 +239,7 @@ pub trait AppExt: Sized { self._arg( optional_opt( "timings", - "Timing output formats (comma separated): html, json (unstable)", + "Timing output formats (unstable) (comma separated): html, json", ) .value_name("FMTS") .require_equals(true), @@ -516,7 +516,12 @@ pub trait ArgMatchesExt { for timing_output in timing_output.split(',') { let timing_output = timing_output.to_ascii_lowercase(); let timing_output = match timing_output.as_str() { - "html" => TimingOutput::Html, + "html" => { + config + .cli_unstable() + .fail_if_stable_opt("--timings=html", 7405)?; + TimingOutput::Html + } "json" => { config .cli_unstable() diff --git a/src/doc/man/generated_txt/cargo-bench.txt b/src/doc/man/generated_txt/cargo-bench.txt index 2bd02a6c623..d3de4625dbb 100644 --- a/src/doc/man/generated_txt/cargo-bench.txt +++ b/src/doc/man/generated_txt/cargo-bench.txt @@ -223,7 +223,9 @@ OPTIONS Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timing without an argument - will default to --timing=html. Valid output formats: + will default to --timing=html. Specifying an output format (rather + than the default) is unstable and requires -Zunstable-options. Valid + output formats: o html: Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. diff --git a/src/doc/man/generated_txt/cargo-build.txt b/src/doc/man/generated_txt/cargo-build.txt index a2f61481116..8735155804c 100644 --- a/src/doc/man/generated_txt/cargo-build.txt +++ b/src/doc/man/generated_txt/cargo-build.txt @@ -160,7 +160,9 @@ OPTIONS Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timing without an argument - will default to --timing=html. Valid output formats: + will default to --timing=html. Specifying an output format (rather + than the default) is unstable and requires -Zunstable-options. Valid + output formats: o html: Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. diff --git a/src/doc/man/generated_txt/cargo-check.txt b/src/doc/man/generated_txt/cargo-check.txt index de04a2bdccb..d9139d4aafe 100644 --- a/src/doc/man/generated_txt/cargo-check.txt +++ b/src/doc/man/generated_txt/cargo-check.txt @@ -173,7 +173,9 @@ OPTIONS Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timing without an argument - will default to --timing=html. Valid output formats: + will default to --timing=html. Specifying an output format (rather + than the default) is unstable and requires -Zunstable-options. Valid + output formats: o html: Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. diff --git a/src/doc/man/generated_txt/cargo-doc.txt b/src/doc/man/generated_txt/cargo-doc.txt index 8cf2cdb48bb..141952f1ca0 100644 --- a/src/doc/man/generated_txt/cargo-doc.txt +++ b/src/doc/man/generated_txt/cargo-doc.txt @@ -144,7 +144,9 @@ OPTIONS Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timing without an argument - will default to --timing=html. Valid output formats: + will default to --timing=html. Specifying an output format (rather + than the default) is unstable and requires -Zunstable-options. Valid + output formats: o html: Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. diff --git a/src/doc/man/generated_txt/cargo-fix.txt b/src/doc/man/generated_txt/cargo-fix.txt index 06d5c16471a..36136c903fc 100644 --- a/src/doc/man/generated_txt/cargo-fix.txt +++ b/src/doc/man/generated_txt/cargo-fix.txt @@ -246,7 +246,9 @@ OPTIONS Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timing without an argument - will default to --timing=html. Valid output formats: + will default to --timing=html. Specifying an output format (rather + than the default) is unstable and requires -Zunstable-options. Valid + output formats: o html: Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. diff --git a/src/doc/man/generated_txt/cargo-install.txt b/src/doc/man/generated_txt/cargo-install.txt index 14ac8b67ebe..4482c239e5b 100644 --- a/src/doc/man/generated_txt/cargo-install.txt +++ b/src/doc/man/generated_txt/cargo-install.txt @@ -209,7 +209,9 @@ OPTIONS Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timing without an argument - will default to --timing=html. Valid output formats: + will default to --timing=html. Specifying an output format (rather + than the default) is unstable and requires -Zunstable-options. Valid + output formats: o html: Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. diff --git a/src/doc/man/generated_txt/cargo-run.txt b/src/doc/man/generated_txt/cargo-run.txt index 180f913f803..42f23f96181 100644 --- a/src/doc/man/generated_txt/cargo-run.txt +++ b/src/doc/man/generated_txt/cargo-run.txt @@ -89,7 +89,9 @@ OPTIONS Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timing without an argument - will default to --timing=html. Valid output formats: + will default to --timing=html. Specifying an output format (rather + than the default) is unstable and requires -Zunstable-options. Valid + output formats: o html: Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. diff --git a/src/doc/man/generated_txt/cargo-rustc.txt b/src/doc/man/generated_txt/cargo-rustc.txt index 0a6df2c28e5..282adfbdedb 100644 --- a/src/doc/man/generated_txt/cargo-rustc.txt +++ b/src/doc/man/generated_txt/cargo-rustc.txt @@ -168,7 +168,9 @@ OPTIONS Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timing without an argument - will default to --timing=html. Valid output formats: + will default to --timing=html. Specifying an output format (rather + than the default) is unstable and requires -Zunstable-options. Valid + output formats: o html: Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. diff --git a/src/doc/man/generated_txt/cargo-rustdoc.txt b/src/doc/man/generated_txt/cargo-rustdoc.txt index 14e08cc0f96..7a73fe8d7b5 100644 --- a/src/doc/man/generated_txt/cargo-rustdoc.txt +++ b/src/doc/man/generated_txt/cargo-rustdoc.txt @@ -160,7 +160,9 @@ OPTIONS Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timing without an argument - will default to --timing=html. Valid output formats: + will default to --timing=html. Specifying an output format (rather + than the default) is unstable and requires -Zunstable-options. Valid + output formats: o html: Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. diff --git a/src/doc/man/generated_txt/cargo-test.txt b/src/doc/man/generated_txt/cargo-test.txt index c77d1d29985..721e7ee7bf2 100644 --- a/src/doc/man/generated_txt/cargo-test.txt +++ b/src/doc/man/generated_txt/cargo-test.txt @@ -237,7 +237,9 @@ OPTIONS Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timing without an argument - will default to --timing=html. Valid output formats: + will default to --timing=html. Specifying an output format (rather + than the default) is unstable and requires -Zunstable-options. Valid + output formats: o html: Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. diff --git a/src/doc/man/includes/options-timings.md b/src/doc/man/includes/options-timings.md index 829581067f2..f04ab3c0c39 100644 --- a/src/doc/man/includes/options-timings.md +++ b/src/doc/man/includes/options-timings.md @@ -1,8 +1,9 @@ {{#option "`--timings=`_fmts_"}} Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output -formats; `--timing` without an argument will default to `--timing=html`. Valid -output formats: +formats; `--timing` without an argument will default to `--timing=html`. +Specifying an output format (rather than the default) is unstable and requires +`-Zunstable-options`. Valid output formats: - `html`: Write a human-readable file `cargo-timing.html` to the `target/cargo-timings` directory with a report of the compilation. Also write diff --git a/src/doc/src/commands/cargo-bench.md b/src/doc/src/commands/cargo-bench.md index c7a7a445cfd..4ef92e37465 100644 --- a/src/doc/src/commands/cargo-bench.md +++ b/src/doc/src/commands/cargo-bench.md @@ -268,8 +268,9 @@ required Rust version as configured in the project's rust-version f
--timings=fmts
Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output -formats; --timing without an argument will default to --timing=html. Valid -output formats:

+formats; --timing without an argument will default to --timing=html. +Specifying an output format (rather than the default) is unstable and requires +-Zunstable-options. Valid output formats: