From 08734a664362b9ea39ba7d15ef340eff25749af4 Mon Sep 17 00:00:00 2001
From: Piggy NL
Date: Fri, 18 Feb 2022 00:26:40 +0800
Subject: [PATCH] Fix errors in `cargo fetch` usage guide
Co-authored-by: Caleb Maclennan
---
src/doc/man/cargo-fetch.md | 3 ++-
src/doc/man/generated_txt/cargo-fetch.txt | 6 +++---
src/doc/man/includes/options-target-triple.md | 6 ++++--
src/doc/src/commands/cargo-bench.md | 3 +--
src/doc/src/commands/cargo-build.md | 3 +--
src/doc/src/commands/cargo-check.md | 3 +--
src/doc/src/commands/cargo-clean.md | 3 +--
src/doc/src/commands/cargo-doc.md | 3 +--
src/doc/src/commands/cargo-fetch.md | 6 +++---
src/doc/src/commands/cargo-fix.md | 3 +--
src/doc/src/commands/cargo-install.md | 3 +--
src/doc/src/commands/cargo-package.md | 3 +--
src/doc/src/commands/cargo-publish.md | 3 +--
src/doc/src/commands/cargo-run.md | 3 +--
src/doc/src/commands/cargo-rustc.md | 3 +--
src/doc/src/commands/cargo-rustdoc.md | 3 +--
src/doc/src/commands/cargo-test.md | 3 +--
src/etc/man/cargo-bench.1 | 3 +--
src/etc/man/cargo-build.1 | 3 +--
src/etc/man/cargo-check.1 | 3 +--
src/etc/man/cargo-clean.1 | 3 +--
src/etc/man/cargo-doc.1 | 3 +--
src/etc/man/cargo-fetch.1 | 5 ++---
src/etc/man/cargo-fix.1 | 3 +--
src/etc/man/cargo-install.1 | 3 +--
src/etc/man/cargo-package.1 | 3 +--
src/etc/man/cargo-publish.1 | 3 +--
src/etc/man/cargo-run.1 | 3 +--
src/etc/man/cargo-rustc.1 | 3 +--
src/etc/man/cargo-rustdoc.1 | 3 +--
src/etc/man/cargo-test.1 | 3 +--
31 files changed, 40 insertions(+), 64 deletions(-)
diff --git a/src/doc/man/cargo-fetch.md b/src/doc/man/cargo-fetch.md
index 2cca5f79748..601ddb248cd 100644
--- a/src/doc/man/cargo-fetch.md
+++ b/src/doc/man/cargo-fetch.md
@@ -1,5 +1,6 @@
# cargo-fetch(1)
{{*set actionverb="Fetch"}}
+{{*set target-default-to-all-arch=true}}
## NAME
@@ -13,7 +14,7 @@ cargo-fetch - Fetch dependencies of a package from the network
If a `Cargo.lock` file is available, this command will ensure that all of the
git dependencies and/or registry dependencies are downloaded and locally
-available. Subsequent Cargo commands never touch the network after a `cargo
+available. Subsequent Cargo commands will be able to run offline after a `cargo
fetch` unless the lock file changes.
If the lock file is not available, then this command will generate the lock
diff --git a/src/doc/man/generated_txt/cargo-fetch.txt b/src/doc/man/generated_txt/cargo-fetch.txt
index 91664c46b96..7c97d01d275 100644
--- a/src/doc/man/generated_txt/cargo-fetch.txt
+++ b/src/doc/man/generated_txt/cargo-fetch.txt
@@ -9,7 +9,7 @@ SYNOPSIS
DESCRIPTION
If a Cargo.lock file is available, this command will ensure that all of
the git dependencies and/or registry dependencies are downloaded and
- locally available. Subsequent Cargo commands never touch the network
+ locally available. Subsequent Cargo commands will be able to run offline
after a cargo fetch unless the lock file changes.
If the lock file is not available, then this command will generate the
@@ -25,8 +25,8 @@ DESCRIPTION
OPTIONS
Fetch options
--target triple
- Fetch for the given architecture. The default is the host
- architecture. The general format of the triple is
+ Fetch for the given architecture. The default is all architectures.
+ The general format of the triple is
---. Run rustc --print target-list for
a list of supported targets.
diff --git a/src/doc/man/includes/options-target-triple.md b/src/doc/man/includes/options-target-triple.md
index 6ad03c6f4be..9d91de66cea 100644
--- a/src/doc/man/includes/options-target-triple.md
+++ b/src/doc/man/includes/options-target-triple.md
@@ -1,6 +1,8 @@
{{#option "`--target` _triple_"}}
-{{actionverb}} for the given architecture. The default is the host
-architecture. The general format of the triple is
+{{actionverb}} for the given architecture.
+{{~#if target-default-to-all-arch}} The default is all architectures.
+{{~else}} The default is the host architecture.
+{{~/if}} The general format of the triple is
`---`. Run `rustc --print target-list` for a
list of supported targets.
diff --git a/src/doc/src/commands/cargo-bench.md b/src/doc/src/commands/cargo-bench.md
index 95343ef3d39..94543d04ace 100644
--- a/src/doc/src/commands/cargo-bench.md
+++ b/src/doc/src/commands/cargo-bench.md
@@ -241,8 +241,7 @@ be specified multiple times, which enables all specified features.
--target
triple
-- Benchmark for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Benchmark for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-build.md b/src/doc/src/commands/cargo-build.md
index c1a55f4b07e..8ac69867119 100644
--- a/src/doc/src/commands/cargo-build.md
+++ b/src/doc/src/commands/cargo-build.md
@@ -169,8 +169,7 @@ be specified multiple times, which enables all specified features.
--target
triple
-- Build for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Build for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-check.md b/src/doc/src/commands/cargo-check.md
index 4c1068f9758..13d64329f25 100644
--- a/src/doc/src/commands/cargo-check.md
+++ b/src/doc/src/commands/cargo-check.md
@@ -174,8 +174,7 @@ be specified multiple times, which enables all specified features.
--target
triple
-- Check for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Check for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-clean.md b/src/doc/src/commands/cargo-clean.md
index 4f38f03b13e..86b188b656a 100644
--- a/src/doc/src/commands/cargo-clean.md
+++ b/src/doc/src/commands/cargo-clean.md
@@ -57,8 +57,7 @@ Defaults to target
in the root of the workspace.
--target
triple
-- Clean for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Clean for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-doc.md b/src/doc/src/commands/cargo-doc.md
index fc25c692e5b..1495c71e757 100644
--- a/src/doc/src/commands/cargo-doc.md
+++ b/src/doc/src/commands/cargo-doc.md
@@ -152,8 +152,7 @@ be specified multiple times, which enables all specified features.
--target
triple
-- Document for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Document for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-fetch.md b/src/doc/src/commands/cargo-fetch.md
index 675d99e602f..0a6a7224f9f 100644
--- a/src/doc/src/commands/cargo-fetch.md
+++ b/src/doc/src/commands/cargo-fetch.md
@@ -1,6 +1,7 @@
# cargo-fetch(1)
+
## NAME
cargo-fetch - Fetch dependencies of a package from the network
@@ -13,7 +14,7 @@ cargo-fetch - Fetch dependencies of a package from the network
If a `Cargo.lock` file is available, this command will ensure that all of the
git dependencies and/or registry dependencies are downloaded and locally
-available. Subsequent Cargo commands never touch the network after a `cargo
+available. Subsequent Cargo commands will be able to run offline after a `cargo
fetch` unless the lock file changes.
If the lock file is not available, then this command will generate the lock
@@ -31,8 +32,7 @@ you plan to use Cargo without a network with the `--offline` flag.
--target
triple
-- Fetch for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Fetch for the given architecture. The default is all architectures. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-fix.md b/src/doc/src/commands/cargo-fix.md
index b00344a3e88..eeeda3d5dca 100644
--- a/src/doc/src/commands/cargo-fix.md
+++ b/src/doc/src/commands/cargo-fix.md
@@ -254,8 +254,7 @@ be specified multiple times, which enables all specified features.
--target
triple
-- Fix for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Fix for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-install.md b/src/doc/src/commands/cargo-install.md
index 7d11122e1f7..0fbc4a3d0a6 100644
--- a/src/doc/src/commands/cargo-install.md
+++ b/src/doc/src/commands/cargo-install.md
@@ -201,8 +201,7 @@ be specified multiple times, which enables all specified features.
--target
triple
-- Install for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Install for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-package.md b/src/doc/src/commands/cargo-package.md
index 57f11332f61..4ac9db605b2 100644
--- a/src/doc/src/commands/cargo-package.md
+++ b/src/doc/src/commands/cargo-package.md
@@ -131,8 +131,7 @@ single quotes or double quotes around each pattern.
--target
triple
-- Package for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Package for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-publish.md b/src/doc/src/commands/cargo-publish.md
index f35e30ef718..79cf1f4a798 100644
--- a/src/doc/src/commands/cargo-publish.md
+++ b/src/doc/src/commands/cargo-publish.md
@@ -97,8 +97,7 @@ format.
--target
triple
-- Publish for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Publish for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-run.md b/src/doc/src/commands/cargo-run.md
index ec7d28a92b0..abd9b536fce 100644
--- a/src/doc/src/commands/cargo-run.md
+++ b/src/doc/src/commands/cargo-run.md
@@ -87,8 +87,7 @@ be specified multiple times, which enables all specified features.
--target
triple
-- Run for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Run for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-rustc.md b/src/doc/src/commands/cargo-rustc.md
index a1ffcc81166..d5f98e8d94d 100644
--- a/src/doc/src/commands/cargo-rustc.md
+++ b/src/doc/src/commands/cargo-rustc.md
@@ -156,8 +156,7 @@ be specified multiple times, which enables all specified features.
--target
triple
-- Build for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Build for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-rustdoc.md b/src/doc/src/commands/cargo-rustdoc.md
index 8417a5d2746..12550053e6f 100644
--- a/src/doc/src/commands/cargo-rustdoc.md
+++ b/src/doc/src/commands/cargo-rustdoc.md
@@ -171,8 +171,7 @@ be specified multiple times, which enables all specified features.
--target
triple
-- Document for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Document for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/doc/src/commands/cargo-test.md b/src/doc/src/commands/cargo-test.md
index 5cb84bbf07c..53409f548d3 100644
--- a/src/doc/src/commands/cargo-test.md
+++ b/src/doc/src/commands/cargo-test.md
@@ -250,8 +250,7 @@ be specified multiple times, which enables all specified features.
--target
triple
-- Test for the given architecture. The default is the host
-architecture. The general format of the triple is
+
- Test for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
list of supported targets.
This may also be specified with the build.target
diff --git a/src/etc/man/cargo-bench.1 b/src/etc/man/cargo-bench.1
index b38409e2464..0b19113e888 100644
--- a/src/etc/man/cargo-bench.1
+++ b/src/etc/man/cargo-bench.1
@@ -244,8 +244,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Benchmark for the given architecture. The default is the host
-architecture. The general format of the triple is
+Benchmark for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-build.1 b/src/etc/man/cargo-build.1
index 80c7b988737..4cd70517e2e 100644
--- a/src/etc/man/cargo-build.1
+++ b/src/etc/man/cargo-build.1
@@ -156,8 +156,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Build for the given architecture. The default is the host
-architecture. The general format of the triple is
+Build for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-check.1 b/src/etc/man/cargo-check.1
index d496867273c..b151e9c7d04 100644
--- a/src/etc/man/cargo-check.1
+++ b/src/etc/man/cargo-check.1
@@ -161,8 +161,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Check for the given architecture. The default is the host
-architecture. The general format of the triple is
+Check for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-clean.1 b/src/etc/man/cargo-clean.1
index 20b9fa1f195..5ff3fc5e532 100644
--- a/src/etc/man/cargo-clean.1
+++ b/src/etc/man/cargo-clean.1
@@ -51,8 +51,7 @@ Defaults to \fBtarget\fR in the root of the workspace.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Clean for the given architecture. The default is the host
-architecture. The general format of the triple is
+Clean for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-doc.1 b/src/etc/man/cargo-doc.1
index 089aac26c48..390da2a7afe 100644
--- a/src/etc/man/cargo-doc.1
+++ b/src/etc/man/cargo-doc.1
@@ -134,8 +134,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Document for the given architecture. The default is the host
-architecture. The general format of the triple is
+Document for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-fetch.1 b/src/etc/man/cargo-fetch.1
index ef5d989dc27..29727934b25 100644
--- a/src/etc/man/cargo-fetch.1
+++ b/src/etc/man/cargo-fetch.1
@@ -10,7 +10,7 @@ cargo\-fetch \- Fetch dependencies of a package from the network
.SH "DESCRIPTION"
If a \fBCargo.lock\fR file is available, this command will ensure that all of the
git dependencies and/or registry dependencies are downloaded and locally
-available. Subsequent Cargo commands never touch the network after a \fBcargo fetch\fR unless the lock file changes.
+available. Subsequent Cargo commands will be able to run offline after a \fBcargo fetch\fR unless the lock file changes.
.sp
If the lock file is not available, then this command will generate the lock
file before fetching the dependencies.
@@ -25,8 +25,7 @@ you plan to use Cargo without a network with the \fB\-\-offline\fR flag.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Fetch for the given architecture. The default is the host
-architecture. The general format of the triple is
+Fetch for the given architecture. The default is all architectures. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-fix.1 b/src/etc/man/cargo-fix.1
index d5ee2200bcf..6957d6708f3 100644
--- a/src/etc/man/cargo-fix.1
+++ b/src/etc/man/cargo-fix.1
@@ -256,8 +256,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Fix for the given architecture. The default is the host
-architecture. The general format of the triple is
+Fix for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-install.1 b/src/etc/man/cargo-install.1
index bb68b3c8ddf..800317b4a74 100644
--- a/src/etc/man/cargo-install.1
+++ b/src/etc/man/cargo-install.1
@@ -229,8 +229,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Install for the given architecture. The default is the host
-architecture. The general format of the triple is
+Install for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-package.1 b/src/etc/man/cargo-package.1
index 3258628f545..6892821d28e 100644
--- a/src/etc/man/cargo-package.1
+++ b/src/etc/man/cargo-package.1
@@ -146,8 +146,7 @@ single quotes or double quotes around each pattern.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Package for the given architecture. The default is the host
-architecture. The general format of the triple is
+Package for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-publish.1 b/src/etc/man/cargo-publish.1
index afd4e91392a..9df93801e6d 100644
--- a/src/etc/man/cargo-publish.1
+++ b/src/etc/man/cargo-publish.1
@@ -96,8 +96,7 @@ format.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Publish for the given architecture. The default is the host
-architecture. The general format of the triple is
+Publish for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-run.1 b/src/etc/man/cargo-run.1
index c9689525b4c..4a940619c12 100644
--- a/src/etc/man/cargo-run.1
+++ b/src/etc/man/cargo-run.1
@@ -67,8 +67,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Run for the given architecture. The default is the host
-architecture. The general format of the triple is
+Run for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-rustc.1 b/src/etc/man/cargo-rustc.1
index b303fe95d4a..2611b91c2ac 100644
--- a/src/etc/man/cargo-rustc.1
+++ b/src/etc/man/cargo-rustc.1
@@ -142,8 +142,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Build for the given architecture. The default is the host
-architecture. The general format of the triple is
+Build for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-rustdoc.1 b/src/etc/man/cargo-rustdoc.1
index 59c1a22fb26..8da62131388 100644
--- a/src/etc/man/cargo-rustdoc.1
+++ b/src/etc/man/cargo-rustdoc.1
@@ -153,8 +153,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Document for the given architecture. The default is the host
-architecture. The general format of the triple is
+Document for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp
diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1
index 71b738350cd..d04f146d74b 100644
--- a/src/etc/man/cargo-test.1
+++ b/src/etc/man/cargo-test.1
@@ -253,8 +253,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.sp
\fB\-\-target\fR \fItriple\fR
.RS 4
-Test for the given architecture. The default is the host
-architecture. The general format of the triple is
+Test for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
list of supported targets.
.sp