From 179cb1031ee324b975cbfc90d139ee14eff9554e Mon Sep 17 00:00:00 2001
From: David Tolnay
Date: Sat, 26 Aug 2023 10:07:41 -0700
Subject: [PATCH] Improve keep-going docs
---
src/doc/man/cargo-bench.md | 9 ++++++++-
src/doc/man/cargo-test.md | 8 ++++++++
src/doc/man/generated_txt/cargo-bench.txt | 11 ++++++++---
src/doc/man/generated_txt/cargo-build.txt | 7 +++++++
src/doc/man/generated_txt/cargo-check.txt | 7 +++++++
src/doc/man/generated_txt/cargo-doc.txt | 7 +++++++
src/doc/man/generated_txt/cargo-fix.txt | 7 +++++++
src/doc/man/generated_txt/cargo-install.txt | 7 +++++++
src/doc/man/generated_txt/cargo-package.txt | 7 +++++++
src/doc/man/generated_txt/cargo-publish.txt | 7 +++++++
src/doc/man/generated_txt/cargo-run.txt | 7 +++++++
src/doc/man/generated_txt/cargo-rustc.txt | 7 +++++++
src/doc/man/generated_txt/cargo-rustdoc.txt | 7 +++++++
src/doc/man/generated_txt/cargo-test.txt | 8 ++++++++
src/doc/man/includes/options-keep-going.md | 6 ++++++
src/doc/src/commands/cargo-bench.md | 11 +++++++----
src/doc/src/commands/cargo-build.md | 7 ++++++-
src/doc/src/commands/cargo-check.md | 7 ++++++-
src/doc/src/commands/cargo-doc.md | 7 ++++++-
src/doc/src/commands/cargo-fix.md | 7 ++++++-
src/doc/src/commands/cargo-install.md | 7 ++++++-
src/doc/src/commands/cargo-package.md | 7 ++++++-
src/doc/src/commands/cargo-publish.md | 7 ++++++-
src/doc/src/commands/cargo-run.md | 7 ++++++-
src/doc/src/commands/cargo-rustc.md | 7 ++++++-
src/doc/src/commands/cargo-rustdoc.md | 7 ++++++-
src/doc/src/commands/cargo-test.md | 8 ++++++++
src/etc/man/cargo-bench.1 | 12 +++++++++---
src/etc/man/cargo-build.1 | 6 ++++++
src/etc/man/cargo-check.1 | 6 ++++++
src/etc/man/cargo-doc.1 | 6 ++++++
src/etc/man/cargo-fix.1 | 6 ++++++
src/etc/man/cargo-install.1 | 6 ++++++
src/etc/man/cargo-package.1 | 6 ++++++
src/etc/man/cargo-publish.1 | 6 ++++++
src/etc/man/cargo-run.1 | 6 ++++++
src/etc/man/cargo-rustc.1 | 6 ++++++
src/etc/man/cargo-rustdoc.1 | 6 ++++++
src/etc/man/cargo-test.1 | 12 ++++++++++++
39 files changed, 264 insertions(+), 21 deletions(-)
diff --git a/src/doc/man/cargo-bench.md b/src/doc/man/cargo-bench.md
index 18771c3d21e4..b401e9d1c5da 100644
--- a/src/doc/man/cargo-bench.md
+++ b/src/doc/man/cargo-bench.md
@@ -157,9 +157,16 @@ Rust test harness runs benchmarks serially in a single thread.
{{#options}}
{{> options-jobs }}
-{{> options-keep-going }}
{{/options}}
+While `cargo bench` involves compilation, it does not provide a `--keep-going`
+flag. Use `--no-fail-fast` to run as many benchmarks as possible without
+stopping at the first failure. To "compile" as many benchmarks as possible, use
+`--benches` to build benchmark binaries separately. For example:
+
+ cargo build --benches --release --keep-going
+ cargo bench --no-fail-fast
+
{{> section-environment }}
{{> section-exit-status }}
diff --git a/src/doc/man/cargo-test.md b/src/doc/man/cargo-test.md
index cba98b20daf9..9c818d9c6868 100644
--- a/src/doc/man/cargo-test.md
+++ b/src/doc/man/cargo-test.md
@@ -190,6 +190,14 @@ includes an option to control the number of threads used:
{{/options}}
+While `cargo test` involves compilation, it does not provide a `--keep-going`
+flag. Use `--no-fail-fast` to run as many tests as possible without stopping at
+the first failure. To "compile" as many tests as possible, use `--tests` to
+build test binaries separately. For example:
+
+ cargo build --tests --keep-going
+ cargo test --tests --no-fail-fast
+
{{> section-environment }}
{{> section-exit-status }}
diff --git a/src/doc/man/generated_txt/cargo-bench.txt b/src/doc/man/generated_txt/cargo-bench.txt
index 2b35dc1e01b6..796fbd11b552 100644
--- a/src/doc/man/generated_txt/cargo-bench.txt
+++ b/src/doc/man/generated_txt/cargo-bench.txt
@@ -413,9 +413,14 @@ OPTIONS
If a string default is provided, it sets the value back to defaults.
Should not be 0.
- --keep-going
- Build as many crates in the dependency graph as possible, rather
- than aborting the build on the first one that fails to build.
+ While cargo bench involves compilation, it does not provide a
+ --keep-going flag. Use --no-fail-fast to run as many benchmarks as
+ possible without stopping at the first failure. To “compile” as many
+ benchmarks as possible, use --benches to build benchmark binaries
+ separately. For example:
+
+ cargo build --benches --release --keep-going
+ cargo bench --no-fail-fast
ENVIRONMENT
See the reference
diff --git a/src/doc/man/generated_txt/cargo-build.txt b/src/doc/man/generated_txt/cargo-build.txt
index 72c9cc8fda15..8583a2b8f7d0 100644
--- a/src/doc/man/generated_txt/cargo-build.txt
+++ b/src/doc/man/generated_txt/cargo-build.txt
@@ -348,6 +348,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting the build on the first one that fails to build.
+ For example if the current package depends on dependencies fails and
+ works, one of which fails to build, cargo check -j1 may or may not
+ build the one that succeeds (depending on which one of the two
+ builds Cargo picked to run first), whereas cargo check -j1
+ --keep-going would definitely run both builds, even if the one run
+ first fails.
+
--future-incompat-report
Displays a future-incompat report for any future-incompatible
warnings produced during execution of this command
diff --git a/src/doc/man/generated_txt/cargo-check.txt b/src/doc/man/generated_txt/cargo-check.txt
index b34de8f02607..b447455eec54 100644
--- a/src/doc/man/generated_txt/cargo-check.txt
+++ b/src/doc/man/generated_txt/cargo-check.txt
@@ -333,6 +333,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting the build on the first one that fails to build.
+ For example if the current package depends on dependencies fails and
+ works, one of which fails to build, cargo check -j1 may or may not
+ build the one that succeeds (depending on which one of the two
+ builds Cargo picked to run first), whereas cargo check -j1
+ --keep-going would definitely run both builds, even if the one run
+ first fails.
+
--future-incompat-report
Displays a future-incompat report for any future-incompatible
warnings produced during execution of this command
diff --git a/src/doc/man/generated_txt/cargo-doc.txt b/src/doc/man/generated_txt/cargo-doc.txt
index 0d6d602b3bb8..0cc8900475f3 100644
--- a/src/doc/man/generated_txt/cargo-doc.txt
+++ b/src/doc/man/generated_txt/cargo-doc.txt
@@ -304,6 +304,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting the build on the first one that fails to build.
+ For example if the current package depends on dependencies fails and
+ works, one of which fails to build, cargo check -j1 may or may not
+ build the one that succeeds (depending on which one of the two
+ builds Cargo picked to run first), whereas cargo check -j1
+ --keep-going would definitely run both builds, even if the one run
+ first fails.
+
ENVIRONMENT
See the reference
diff --git a/src/doc/man/generated_txt/cargo-fix.txt b/src/doc/man/generated_txt/cargo-fix.txt
index 67b00f04d1f7..d8c99ca6399d 100644
--- a/src/doc/man/generated_txt/cargo-fix.txt
+++ b/src/doc/man/generated_txt/cargo-fix.txt
@@ -406,6 +406,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting the build on the first one that fails to build.
+ For example if the current package depends on dependencies fails and
+ works, one of which fails to build, cargo check -j1 may or may not
+ build the one that succeeds (depending on which one of the two
+ builds Cargo picked to run first), whereas cargo check -j1
+ --keep-going would definitely run both builds, even if the one run
+ first fails.
+
ENVIRONMENT
See the reference
diff --git a/src/doc/man/generated_txt/cargo-install.txt b/src/doc/man/generated_txt/cargo-install.txt
index 053fcad40601..1323dcc0f471 100644
--- a/src/doc/man/generated_txt/cargo-install.txt
+++ b/src/doc/man/generated_txt/cargo-install.txt
@@ -281,6 +281,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting the build on the first one that fails to build.
+ For example if the current package depends on dependencies fails and
+ works, one of which fails to build, cargo check -j1 may or may not
+ build the one that succeeds (depending on which one of the two
+ builds Cargo picked to run first), whereas cargo check -j1
+ --keep-going would definitely run both builds, even if the one run
+ first fails.
+
Display Options
-v, --verbose
Use verbose output. May be specified twice for “very verbose”
diff --git a/src/doc/man/generated_txt/cargo-package.txt b/src/doc/man/generated_txt/cargo-package.txt
index dd6b3a9dbaf3..939247d01499 100644
--- a/src/doc/man/generated_txt/cargo-package.txt
+++ b/src/doc/man/generated_txt/cargo-package.txt
@@ -198,6 +198,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting the build on the first one that fails to build.
+ For example if the current package depends on dependencies fails and
+ works, one of which fails to build, cargo check -j1 may or may not
+ build the one that succeeds (depending on which one of the two
+ builds Cargo picked to run first), whereas cargo check -j1
+ --keep-going would definitely run both builds, even if the one run
+ first fails.
+
Display Options
-v, --verbose
Use verbose output. May be specified twice for “very verbose”
diff --git a/src/doc/man/generated_txt/cargo-publish.txt b/src/doc/man/generated_txt/cargo-publish.txt
index 7ab76ad3d51a..3e094bd454a7 100644
--- a/src/doc/man/generated_txt/cargo-publish.txt
+++ b/src/doc/man/generated_txt/cargo-publish.txt
@@ -164,6 +164,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting the build on the first one that fails to build.
+ For example if the current package depends on dependencies fails and
+ works, one of which fails to build, cargo check -j1 may or may not
+ build the one that succeeds (depending on which one of the two
+ builds Cargo picked to run first), whereas cargo check -j1
+ --keep-going would definitely run both builds, even if the one run
+ first fails.
+
Display Options
-v, --verbose
Use verbose output. May be specified twice for “very verbose”
diff --git a/src/doc/man/generated_txt/cargo-run.txt b/src/doc/man/generated_txt/cargo-run.txt
index 10714237d897..0a50bb2480d9 100644
--- a/src/doc/man/generated_txt/cargo-run.txt
+++ b/src/doc/man/generated_txt/cargo-run.txt
@@ -252,6 +252,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting the build on the first one that fails to build.
+ For example if the current package depends on dependencies fails and
+ works, one of which fails to build, cargo check -j1 may or may not
+ build the one that succeeds (depending on which one of the two
+ builds Cargo picked to run first), whereas cargo check -j1
+ --keep-going would definitely run both builds, even if the one run
+ first fails.
+
ENVIRONMENT
See the reference
diff --git a/src/doc/man/generated_txt/cargo-rustc.txt b/src/doc/man/generated_txt/cargo-rustc.txt
index 939c425cd2ce..756ba95a5351 100644
--- a/src/doc/man/generated_txt/cargo-rustc.txt
+++ b/src/doc/man/generated_txt/cargo-rustc.txt
@@ -350,6 +350,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting the build on the first one that fails to build.
+ For example if the current package depends on dependencies fails and
+ works, one of which fails to build, cargo check -j1 may or may not
+ build the one that succeeds (depending on which one of the two
+ builds Cargo picked to run first), whereas cargo check -j1
+ --keep-going would definitely run both builds, even if the one run
+ first fails.
+
--future-incompat-report
Displays a future-incompat report for any future-incompatible
warnings produced during execution of this command
diff --git a/src/doc/man/generated_txt/cargo-rustdoc.txt b/src/doc/man/generated_txt/cargo-rustdoc.txt
index d3766801a7ae..bf569188edf0 100644
--- a/src/doc/man/generated_txt/cargo-rustdoc.txt
+++ b/src/doc/man/generated_txt/cargo-rustdoc.txt
@@ -320,6 +320,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting the build on the first one that fails to build.
+ For example if the current package depends on dependencies fails and
+ works, one of which fails to build, cargo check -j1 may or may not
+ build the one that succeeds (depending on which one of the two
+ builds Cargo picked to run first), whereas cargo check -j1
+ --keep-going would definitely run both builds, even if the one run
+ first fails.
+
ENVIRONMENT
See the reference
diff --git a/src/doc/man/generated_txt/cargo-test.txt b/src/doc/man/generated_txt/cargo-test.txt
index dc32bdbf7fe0..b992d0d2f620 100644
--- a/src/doc/man/generated_txt/cargo-test.txt
+++ b/src/doc/man/generated_txt/cargo-test.txt
@@ -448,6 +448,14 @@ OPTIONS
See cargo-report(1)
+ While cargo test involves compilation, it does not provide a
+ --keep-going flag. Use --no-fail-fast to run as many tests as possible
+ without stopping at the first failure. To “compile” as many tests as
+ possible, use --tests to build test binaries separately. For example:
+
+ cargo build --tests --keep-going
+ cargo test --tests --no-fail-fast
+
ENVIRONMENT
See the reference
diff --git a/src/doc/man/includes/options-keep-going.md b/src/doc/man/includes/options-keep-going.md
index 7db353c83a2d..ad1177a7c93b 100644
--- a/src/doc/man/includes/options-keep-going.md
+++ b/src/doc/man/includes/options-keep-going.md
@@ -1,4 +1,10 @@
{{#option "`--keep-going`"}}
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+
+For example if the current package depends on dependencies `fails` and `works`,
+one of which fails to build, `cargo check -j1` may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas `cargo check -j1 --keep-going` would definitely run both builds, even if
+the one run first fails.
{{/option}}
diff --git a/src/doc/src/commands/cargo-bench.md b/src/doc/src/commands/cargo-bench.md
index 66c8057ac839..e7f92ea65132 100644
--- a/src/doc/src/commands/cargo-bench.md
+++ b/src/doc/src/commands/cargo-bench.md
@@ -481,12 +481,15 @@ a string default
is provided, it sets the value back to defaults.
Should not be 0.
---keep-going
-Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+
+While `cargo bench` involves compilation, it does not provide a `--keep-going`
+flag. Use `--no-fail-fast` to run as many benchmarks as possible without
+stopping at the first failure. To "compile" as many benchmarks as possible, use
+`--benches` to build benchmark binaries separately. For example:
-
+ cargo build --benches --release --keep-going
+ cargo bench --no-fail-fast
## ENVIRONMENT
diff --git a/src/doc/src/commands/cargo-build.md b/src/doc/src/commands/cargo-build.md
index de6d0bad9d99..fee7f20fefa8 100644
--- a/src/doc/src/commands/cargo-build.md
+++ b/src/doc/src/commands/cargo-build.md
@@ -409,7 +409,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+the build on the first one that fails to build.
+For example if the current package depends on dependencies fails
and works
,
+one of which fails to build, cargo check -j1
may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas cargo check -j1 --keep-going
would definitely run both builds, even if
+the one run first fails.
--future-incompat-report
diff --git a/src/doc/src/commands/cargo-check.md b/src/doc/src/commands/cargo-check.md
index 08a35c31dd5a..7ba2ec6fc085 100644
--- a/src/doc/src/commands/cargo-check.md
+++ b/src/doc/src/commands/cargo-check.md
@@ -390,7 +390,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+the build on the first one that fails to build.
+For example if the current package depends on dependencies fails
and works
,
+one of which fails to build, cargo check -j1
may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas cargo check -j1 --keep-going
would definitely run both builds, even if
+the one run first fails.
--future-incompat-report
diff --git a/src/doc/src/commands/cargo-doc.md b/src/doc/src/commands/cargo-doc.md
index dee41fca689c..0dd4a9ff67d3 100644
--- a/src/doc/src/commands/cargo-doc.md
+++ b/src/doc/src/commands/cargo-doc.md
@@ -364,7 +364,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+the build on the first one that fails to build.
+For example if the current package depends on dependencies fails
and works
,
+one of which fails to build, cargo check -j1
may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas cargo check -j1 --keep-going
would definitely run both builds, even if
+the one run first fails.
diff --git a/src/doc/src/commands/cargo-fix.md b/src/doc/src/commands/cargo-fix.md
index 82aed2852bda..f2f75a51c202 100644
--- a/src/doc/src/commands/cargo-fix.md
+++ b/src/doc/src/commands/cargo-fix.md
@@ -470,7 +470,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+the build on the first one that fails to build.
+For example if the current package depends on dependencies fails
and works
,
+one of which fails to build, cargo check -j1
may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas cargo check -j1 --keep-going
would definitely run both builds, even if
+the one run first fails.
diff --git a/src/doc/src/commands/cargo-install.md b/src/doc/src/commands/cargo-install.md
index 88b581e58fe6..9926f58dc536 100644
--- a/src/doc/src/commands/cargo-install.md
+++ b/src/doc/src/commands/cargo-install.md
@@ -319,7 +319,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+the build on the first one that fails to build.
+For example if the current package depends on dependencies fails
and works
,
+one of which fails to build, cargo check -j1
may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas cargo check -j1 --keep-going
would definitely run both builds, even if
+the one run first fails.
diff --git a/src/doc/src/commands/cargo-package.md b/src/doc/src/commands/cargo-package.md
index 39ca600b9db4..ca98308edb81 100644
--- a/src/doc/src/commands/cargo-package.md
+++ b/src/doc/src/commands/cargo-package.md
@@ -234,7 +234,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+the build on the first one that fails to build.
+For example if the current package depends on dependencies fails
and works
,
+one of which fails to build, cargo check -j1
may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas cargo check -j1 --keep-going
would definitely run both builds, even if
+the one run first fails.
diff --git a/src/doc/src/commands/cargo-publish.md b/src/doc/src/commands/cargo-publish.md
index e7b537a51da2..b3e89af5fd82 100644
--- a/src/doc/src/commands/cargo-publish.md
+++ b/src/doc/src/commands/cargo-publish.md
@@ -200,7 +200,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+the build on the first one that fails to build.
+For example if the current package depends on dependencies fails
and works
,
+one of which fails to build, cargo check -j1
may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas cargo check -j1 --keep-going
would definitely run both builds, even if
+the one run first fails.
diff --git a/src/doc/src/commands/cargo-run.md b/src/doc/src/commands/cargo-run.md
index 396a00389172..7098514f7afd 100644
--- a/src/doc/src/commands/cargo-run.md
+++ b/src/doc/src/commands/cargo-run.md
@@ -306,7 +306,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+the build on the first one that fails to build.
+For example if the current package depends on dependencies fails
and works
,
+one of which fails to build, cargo check -j1
may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas cargo check -j1 --keep-going
would definitely run both builds, even if
+the one run first fails.
diff --git a/src/doc/src/commands/cargo-rustc.md b/src/doc/src/commands/cargo-rustc.md
index f1cef6bce5f8..cd108b3fe686 100644
--- a/src/doc/src/commands/cargo-rustc.md
+++ b/src/doc/src/commands/cargo-rustc.md
@@ -403,7 +403,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+the build on the first one that fails to build.
+For example if the current package depends on dependencies fails
and works
,
+one of which fails to build, cargo check -j1
may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas cargo check -j1 --keep-going
would definitely run both builds, even if
+the one run first fails.
--future-incompat-report
diff --git a/src/doc/src/commands/cargo-rustdoc.md b/src/doc/src/commands/cargo-rustdoc.md
index 9f5a56c489d3..162f67012d01 100644
--- a/src/doc/src/commands/cargo-rustdoc.md
+++ b/src/doc/src/commands/cargo-rustdoc.md
@@ -383,7 +383,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+the build on the first one that fails to build.
+For example if the current package depends on dependencies fails
and works
,
+one of which fails to build, cargo check -j1
may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas cargo check -j1 --keep-going
would definitely run both builds, even if
+the one run first fails.
diff --git a/src/doc/src/commands/cargo-test.md b/src/doc/src/commands/cargo-test.md
index bcf46d601916..286149dde599 100644
--- a/src/doc/src/commands/cargo-test.md
+++ b/src/doc/src/commands/cargo-test.md
@@ -524,6 +524,14 @@ produced during execution of this command
+While `cargo test` involves compilation, it does not provide a `--keep-going`
+flag. Use `--no-fail-fast` to run as many tests as possible without stopping at
+the first failure. To "compile" as many tests as possible, use `--tests` to
+build test binaries separately. For example:
+
+ cargo build --tests --keep-going
+ cargo test --tests --no-fail-fast
+
## ENVIRONMENT
See [the reference](../reference/environment-variables.html) for
diff --git a/src/etc/man/cargo-bench.1 b/src/etc/man/cargo-bench.1
index 5b22687a0442..64498c4d602b 100644
--- a/src/etc/man/cargo-bench.1
+++ b/src/etc/man/cargo-bench.1
@@ -502,10 +502,16 @@ a string \fBdefault\fR is provided, it sets the value back to defaults.
Should not be 0.
.RE
.sp
-\fB\-\-keep\-going\fR
+While \fBcargo bench\fR involves compilation, it does not provide a \fB\-\-keep\-going\fR
+flag. Use \fB\-\-no\-fail\-fast\fR to run as many benchmarks as possible without
+stopping at the first failure. To \[lq]compile\[rq] as many benchmarks as possible, use
+\fB\-\-benches\fR to build benchmark binaries separately. For example:
+.sp
.RS 4
-Build as many crates in the dependency graph as possible, rather than aborting
-the build on the first one that fails to build.
+.nf
+cargo build \-\-benches \-\-release \-\-keep\-going
+cargo bench \-\-no\-fail\-fast
+.fi
.RE
.SH "ENVIRONMENT"
See \fIthe reference\fR for
diff --git a/src/etc/man/cargo-build.1 b/src/etc/man/cargo-build.1
index cb8d38965caa..fc0b810e95e6 100644
--- a/src/etc/man/cargo-build.1
+++ b/src/etc/man/cargo-build.1
@@ -421,6 +421,12 @@ Should not be 0.
.RS 4
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+.sp
+For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR,
+one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if
+the one run first fails.
.RE
.sp
\fB\-\-future\-incompat\-report\fR
diff --git a/src/etc/man/cargo-check.1 b/src/etc/man/cargo-check.1
index ab48e6247333..a6fcdbe05a26 100644
--- a/src/etc/man/cargo-check.1
+++ b/src/etc/man/cargo-check.1
@@ -402,6 +402,12 @@ Should not be 0.
.RS 4
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+.sp
+For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR,
+one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if
+the one run first fails.
.RE
.sp
\fB\-\-future\-incompat\-report\fR
diff --git a/src/etc/man/cargo-doc.1 b/src/etc/man/cargo-doc.1
index 3794be4576db..9ae18b3181fd 100644
--- a/src/etc/man/cargo-doc.1
+++ b/src/etc/man/cargo-doc.1
@@ -369,6 +369,12 @@ Should not be 0.
.RS 4
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+.sp
+For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR,
+one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if
+the one run first fails.
.RE
.SH "ENVIRONMENT"
See \fIthe reference\fR for
diff --git a/src/etc/man/cargo-fix.1 b/src/etc/man/cargo-fix.1
index 093c91b8d4d2..971e5a10979d 100644
--- a/src/etc/man/cargo-fix.1
+++ b/src/etc/man/cargo-fix.1
@@ -497,6 +497,12 @@ Should not be 0.
.RS 4
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+.sp
+For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR,
+one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if
+the one run first fails.
.RE
.SH "ENVIRONMENT"
See \fIthe reference\fR for
diff --git a/src/etc/man/cargo-install.1 b/src/etc/man/cargo-install.1
index 9356559ee221..e38ba14f1be1 100644
--- a/src/etc/man/cargo-install.1
+++ b/src/etc/man/cargo-install.1
@@ -347,6 +347,12 @@ Should not be 0.
.RS 4
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+.sp
+For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR,
+one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if
+the one run first fails.
.RE
.SS "Display Options"
.sp
diff --git a/src/etc/man/cargo-package.1 b/src/etc/man/cargo-package.1
index a8c64f180762..421e52eb7b46 100644
--- a/src/etc/man/cargo-package.1
+++ b/src/etc/man/cargo-package.1
@@ -243,6 +243,12 @@ Should not be 0.
.RS 4
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+.sp
+For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR,
+one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if
+the one run first fails.
.RE
.SS "Display Options"
.sp
diff --git a/src/etc/man/cargo-publish.1 b/src/etc/man/cargo-publish.1
index 9f95d14df0e9..7f5dc1ddd5d7 100644
--- a/src/etc/man/cargo-publish.1
+++ b/src/etc/man/cargo-publish.1
@@ -193,6 +193,12 @@ Should not be 0.
.RS 4
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+.sp
+For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR,
+one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if
+the one run first fails.
.RE
.SS "Display Options"
.sp
diff --git a/src/etc/man/cargo-run.1 b/src/etc/man/cargo-run.1
index a33e437e8d71..d4816144d542 100644
--- a/src/etc/man/cargo-run.1
+++ b/src/etc/man/cargo-run.1
@@ -306,6 +306,12 @@ Should not be 0.
.RS 4
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+.sp
+For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR,
+one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if
+the one run first fails.
.RE
.SH "ENVIRONMENT"
See \fIthe reference\fR for
diff --git a/src/etc/man/cargo-rustc.1 b/src/etc/man/cargo-rustc.1
index 5b528eedb3f2..37cf022f9ab8 100644
--- a/src/etc/man/cargo-rustc.1
+++ b/src/etc/man/cargo-rustc.1
@@ -420,6 +420,12 @@ Should not be 0.
.RS 4
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+.sp
+For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR,
+one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if
+the one run first fails.
.RE
.sp
\fB\-\-future\-incompat\-report\fR
diff --git a/src/etc/man/cargo-rustdoc.1 b/src/etc/man/cargo-rustdoc.1
index c9958e32723d..2cb3870714b7 100644
--- a/src/etc/man/cargo-rustdoc.1
+++ b/src/etc/man/cargo-rustdoc.1
@@ -388,6 +388,12 @@ Should not be 0.
.RS 4
Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.
+.sp
+For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR,
+one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that
+succeeds (depending on which one of the two builds Cargo picked to run first),
+whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if
+the one run first fails.
.RE
.SH "ENVIRONMENT"
See \fIthe reference\fR for
diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1
index 4ca150dbcb12..8e460e167f6e 100644
--- a/src/etc/man/cargo-test.1
+++ b/src/etc/man/cargo-test.1
@@ -542,6 +542,18 @@ produced during execution of this command
.sp
See \fBcargo\-report\fR(1)
.RE
+.sp
+While \fBcargo test\fR involves compilation, it does not provide a \fB\-\-keep\-going\fR
+flag. Use \fB\-\-no\-fail\-fast\fR to run as many tests as possible without stopping at
+the first failure. To \[lq]compile\[rq] as many tests as possible, use \fB\-\-tests\fR to
+build test binaries separately. For example:
+.sp
+.RS 4
+.nf
+cargo build \-\-tests \-\-keep\-going
+cargo test \-\-tests \-\-no\-fail\-fast
+.fi
+.RE
.SH "ENVIRONMENT"
See \fIthe reference\fR for
details on environment variables that Cargo reads.