Skip to content

Commit e8188d2

Browse files
committed
Auto merge of #122190 - matthiaskrgr:rollup-9ol4y30, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #121025 (add known-bug tests for derive failure to detect packed repr) - #121194 (Refactor pre-getopts command line argument handling) - #121563 (Use `ControlFlow` in visitors.) - #122173 (Don't ICE in CTFE if raw/fn-ptr types differ) - #122175 (Bless tidy issues order) - #122179 (rustc: Fix typo) - #122181 (Fix crash in internal late lint checking) - #122183 (interpret: update comment about read_discriminant on uninhabited variants) Failed merges: - #122076 (Tweak the way we protect in-place function arguments in interpreters) - #122132 (Diagnostic renaming 3) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 82cc4e3 + 986c89f commit e8188d2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bin/miri.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ fn main() {
342342
// (`install_ice_hook` might change `RUST_BACKTRACE`.)
343343
let env_snapshot = env::vars_os().collect::<Vec<_>>();
344344

345+
let args = rustc_driver::args::raw_args(&early_dcx).unwrap_or_else(|_| std::process::exit(rustc_driver::EXIT_FAILURE));
346+
345347
// If the environment asks us to actually be rustc, then do that.
346348
if let Some(crate_kind) = env::var_os("MIRI_BE_RUSTC") {
347349
// Earliest rustc setup.
@@ -359,7 +361,7 @@ fn main() {
359361

360362
// We cannot use `rustc_driver::main` as we need to adjust the CLI arguments.
361363
run_compiler(
362-
env::args().collect(),
364+
args,
363365
target_crate,
364366
&mut MiriBeRustCompilerCalls { target_crate },
365367
using_internal_features,
@@ -382,7 +384,7 @@ fn main() {
382384

383385
// If user has explicitly enabled/disabled isolation
384386
let mut isolation_enabled: Option<bool> = None;
385-
for arg in env::args() {
387+
for arg in args {
386388
if rustc_args.is_empty() {
387389
// Very first arg: binary name.
388390
rustc_args.push(arg);

0 commit comments

Comments
 (0)