Skip to content

Commit

Permalink
Add some help about rustup's +toolchain syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jul 6, 2020
1 parent f236c35 commit 337fd9f
Show file tree
Hide file tree
Showing 64 changed files with 597 additions and 43 deletions.
7 changes: 7 additions & 0 deletions src/bin/cargo/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,20 @@ impl GlobalArgs {
}

fn cli() -> App {
let is_rustup = std::env::var_os("RUSTUP_HOME").is_some();
let usage = if is_rustup {
"cargo [+toolchain] [OPTIONS] [SUBCOMMAND]"
} else {
"cargo [OPTIONS] [SUBCOMMAND]"
};
App::new("cargo")
.settings(&[
AppSettings::UnifiedHelpMessage,
AppSettings::DeriveDisplayOrder,
AppSettings::VersionlessSubcommands,
AppSettings::AllowExternalSubcommands,
])
.usage(usage)
.template(
"\
Rust's package manager
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-bench.html
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,14 @@ <h3 id="cargo_bench_manifest_options">Manifest Options</h3>
<h3 id="cargo_bench_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-build.html
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ <h3 id="cargo_build_manifest_options">Manifest Options</h3>
<h3 id="cargo_build_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-check.html
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,14 @@ <h3 id="cargo_check_manifest_options">Manifest Options</h3>
<h3 id="cargo_check_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-clean.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ <h3 id="cargo_clean_manifest_options">Manifest Options</h3>
<h3 id="cargo_clean_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,14 @@ <h3 id="cargo_doc_manifest_options">Manifest Options</h3>
<h3 id="cargo_doc_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-fetch.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ <h3 id="cargo_fetch_manifest_options">Manifest Options</h3>
<h3 id="cargo_fetch_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-fix.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,14 @@ <h3 id="cargo_fix_manifest_options">Manifest Options</h3>
<h3 id="cargo_fix_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-generate-lockfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ <h3 id="cargo_generate_lockfile_manifest_options">Manifest Options</h3>
<h3 id="cargo_generate_lockfile_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-init.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ <h3 id="cargo_init_display_options">Display Options</h3>
<h3 id="cargo_init_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-install.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,14 @@ <h3 id="cargo_install_display_options">Display Options</h3>
<h3 id="cargo_install_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-locate-project.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ <h3 id="cargo_locate_project_manifest_options">Manifest Options</h3>
<h3 id="cargo_locate_project_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-login.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ <h3 id="cargo_login_display_options">Display Options</h3>
<h3 id="cargo_login_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,14 @@ <h3 id="cargo_metadata_manifest_options">Manifest Options</h3>
<h3 id="cargo_metadata_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-new.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ <h3 id="cargo_new_display_options">Display Options</h3>
<h3 id="cargo_new_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-owner.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ <h3 id="cargo_owner_display_options">Display Options</h3>
<h3 id="cargo_owner_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-package.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ <h3 id="cargo_package_display_options">Display Options</h3>
<h3 id="cargo_package_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-pkgid.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,14 @@ <h3 id="cargo_pkgid_manifest_options">Manifest Options</h3>
<h3 id="cargo_pkgid_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-publish.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ <h3 id="cargo_publish_display_options">Display Options</h3>
<h3 id="cargo_publish_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-run.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,14 @@ <h3 id="cargo_run_manifest_options">Manifest Options</h3>
<h3 id="cargo_run_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-rustc.html
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,14 @@ <h3 id="cargo_rustc_manifest_options">Manifest Options</h3>
<h3 id="cargo_rustc_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-rustdoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,14 @@ <h3 id="cargo_rustdoc_manifest_options">Manifest Options</h3>
<h3 id="cargo_rustdoc_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ <h3 id="cargo_search_display_options">Display Options</h3>
<h3 id="cargo_search_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,14 @@ <h3 id="cargo_test_manifest_options">Manifest Options</h3>
<h3 id="cargo_test_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,14 @@ <h3 id="cargo_tree_display_options">Display Options</h3>
<h3 id="cargo_tree_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated/cargo-uninstall.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ <h3 id="cargo_uninstall_display_options">Display Options</h3>
<h3 id="cargo_uninstall_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
<dd>
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
as <code>+stable</code> or <code>+nightly</code>).
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
for more information about how toolchain overrides work.</p>
</dd>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
Expand Down
Loading

0 comments on commit 337fd9f

Please sign in to comment.