about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-14 02:44:01 +0000
committerbors <bors@rust-lang.org>2024-06-14 02:44:01 +0000
commitbfa098eae0b5667a8cb5bbbe990a2d7e8445571f (patch)
treeccf475d10d0968adfa323ac7f2c610ca92a51966 /src/bootstrap
parent0ef0dd24510b52da980889546fcd15254dc56a23 (diff)
parent3494ea18186482b9753a00cc7d163151704aa220 (diff)
downloadrust-bfa098eae0b5667a8cb5bbbe990a2d7e8445571f.tar.gz
rust-bfa098eae0b5667a8cb5bbbe990a2d7e8445571f.zip
Auto merge of #126439 - matthiaskrgr:rollup-856xt18, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #123726 (Clarify `Command::new` behavior for programs with arguments)
 - #126088 ([1/2] clean-up / general improvements)
 - #126238 (Fix Miri sysroot for `x run`)
 - #126315 (Add pub struct with allow(dead_code) into worklist)
 - #126360 (Uplift `structural_traits.rs` into the new trait solver)
 - #126371 (Tweak output of import suggestions)
 - #126388 (const-eval: make lint scope computation consistent)
 - #126390 (Fix wording in {checked_}next_power_of_two)
 - #126392 (Small style improvement in `gvn.rs`)
 - #126402 (Fix wrong `assert_unsafe_precondition` message for `core::ptr::copy`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/format.rs2
-rw-r--r--src/bootstrap/src/core/build_steps/run.rs8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/bootstrap/src/core/build_steps/format.rs b/src/bootstrap/src/core/build_steps/format.rs
index 2deb9168df2..b96e26dbb3a 100644
--- a/src/bootstrap/src/core/build_steps/format.rs
+++ b/src/bootstrap/src/core/build_steps/format.rs
@@ -93,7 +93,7 @@ fn get_modified_rs_files(build: &Builder<'_>) -> Result<Option<Vec<String>>, Str
         return Ok(None);
     }
 
-    get_git_modified_files(&build.config.git_config(), Some(&build.config.src), &vec!["rs"])
+    get_git_modified_files(&build.config.git_config(), Some(&build.config.src), &["rs"])
 }
 
 #[derive(serde_derive::Deserialize)]
diff --git a/src/bootstrap/src/core/build_steps/run.rs b/src/bootstrap/src/core/build_steps/run.rs
index 354eb2b6003..9268b335db7 100644
--- a/src/bootstrap/src/core/build_steps/run.rs
+++ b/src/bootstrap/src/core/build_steps/run.rs
@@ -149,12 +149,14 @@ impl Step for Miri {
             &[],
         );
         miri.add_rustc_lib_path(builder);
-        // Forward arguments.
         miri.arg("--").arg("--target").arg(target.rustc_target_arg());
-        miri.args(builder.config.args());
 
         // miri tests need to know about the stage sysroot
-        miri.env("MIRI_SYSROOT", &miri_sysroot);
+        miri.arg("--sysroot").arg(miri_sysroot);
+
+        // Forward arguments. This may contain further arguments to the program
+        // after another --, so this must be at the end.
+        miri.args(builder.config.args());
 
         let mut miri = Command::from(miri);
         builder.run(&mut miri);