about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/setup.rs15
-rw-r--r--src/bootstrap/test.rs1
2 files changed, 10 insertions, 6 deletions
diff --git a/src/bootstrap/setup.rs b/src/bootstrap/setup.rs
index f5ce45a5bd1..55d2445fc49 100644
--- a/src/bootstrap/setup.rs
+++ b/src/bootstrap/setup.rs
@@ -127,14 +127,17 @@ pub fn setup(src_path: &Path, profile: Profile) {
 
 // Used to get the path for `Subcommand::Setup`
 pub fn interactive_path() -> io::Result<Profile> {
-    fn abbrev_all() -> impl Iterator<Item = (String, Profile)> {
-        ('a'..).map(|c| c.to_string()).zip(Profile::all())
+    fn abbrev_all() -> impl Iterator<Item = ((String, String), Profile)> {
+        ('a'..)
+            .zip(1..)
+            .map(|(letter, number)| (letter.to_string(), number.to_string()))
+            .zip(Profile::all())
     }
 
     fn parse_with_abbrev(input: &str) -> Result<Profile, String> {
         let input = input.trim().to_lowercase();
-        for (letter, profile) in abbrev_all() {
-            if input == letter {
+        for ((letter, number), profile) in abbrev_all() {
+            if input == letter || input == number {
                 return Ok(profile);
             }
         }
@@ -142,13 +145,13 @@ pub fn interactive_path() -> io::Result<Profile> {
     }
 
     println!("Welcome to the Rust project! What do you want to do with x.py?");
-    for (letter, profile) in abbrev_all() {
+    for ((letter, _), profile) in abbrev_all() {
         println!("{}) {}: {}", letter, profile, profile.purpose());
     }
     let template = loop {
         print!(
             "Please choose one ({}): ",
-            abbrev_all().map(|(l, _)| l).collect::<Vec<_>>().join("/")
+            abbrev_all().map(|((l, _), _)| l).collect::<Vec<_>>().join("/")
         );
         io::stdout().flush()?;
         let mut input = String::new();
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 5a73f583045..b48e9696c9a 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1040,6 +1040,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
         cmd.arg("--src-base").arg(builder.src.join("src/test").join(suite));
         cmd.arg("--build-base").arg(testdir(builder, compiler.host).join(suite));
         cmd.arg("--stage-id").arg(format!("stage{}-{}", compiler.stage, target));
+        cmd.arg("--suite").arg(suite);
         cmd.arg("--mode").arg(mode);
         cmd.arg("--target").arg(target.rustc_target_arg());
         cmd.arg("--host").arg(&*compiler.host.triple);