summary refs log tree commit diff
path: root/src/bootstrap/flags.rs
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2020-10-13 00:07:52 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2020-10-14 11:40:53 +0100
commitc4c5653a48fa6871bf2a07dd56cb7f2801115bfb (patch)
treef61d224fec48e30ac3c1c58bf6ed78ab8a8a3575 /src/bootstrap/flags.rs
parent5565241f65cf402c3dbcb55dd492f172c473d4ce (diff)
downloadrust-c4c5653a48fa6871bf2a07dd56cb7f2801115bfb.tar.gz
rust-c4c5653a48fa6871bf2a07dd56cb7f2801115bfb.zip
x.py: setup: Refactor to centralise list of profiles
Put all()'s otuput in the order we want to print things in, and add a
comment about why they are in this order.  Provide purpose() and
all_for_help().  Use these things everywhere.

Move all the abbrev character ("a", "b", etc.) processing into
interactive_path.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'src/bootstrap/flags.rs')
-rw-r--r--src/bootstrap/flags.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs
index c10188875fb..f38c6876747 100644
--- a/src/bootstrap/flags.rs
+++ b/src/bootstrap/flags.rs
@@ -551,9 +551,7 @@ Arguments:
                     profile_string.parse().unwrap_or_else(|err| {
                         eprintln!("error: {}", err);
                         eprintln!("help: the available profiles are:");
-                        for choice in Profile::all() {
-                            eprintln!("- {}", choice);
-                        }
+                        eprint!("{}", Profile::all_for_help("- "));
                         std::process::exit(1);
                     })
                 } else {