Skip to content

Commit 0f9a63d

Browse files
author
The Miri Cronjob Bot
committed
Merge from rustc
2 parents a4db8cb + 758d784 commit 0f9a63d

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

src/bin/miri.rs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::ops::Range;
3030
use std::path::PathBuf;
3131
use std::str::FromStr;
3232
use std::sync::atomic::{AtomicI32, Ordering};
33-
use std::sync::{Arc, Once};
33+
use std::sync::Once;
3434

3535
use miri::{
3636
BacktraceStyle, BorrowTrackerMethod, MiriConfig, MiriEntryFnType, ProvenanceMode, RetagFields,
@@ -371,13 +371,10 @@ fn init_late_loggers(early_dcx: &EarlyDiagCtxt, tcx: TyCtxt<'_>) {
371371
fn run_compiler_and_exit(
372372
args: &[String],
373373
callbacks: &mut (dyn rustc_driver::Callbacks + Send),
374-
using_internal_features: Arc<std::sync::atomic::AtomicBool>,
375374
) -> ! {
376375
// Invoke compiler, and handle return code.
377376
let exit_code = rustc_driver::catch_with_exit_code(move || {
378-
rustc_driver::RunCompiler::new(args, callbacks)
379-
.set_using_internal_features(using_internal_features)
380-
.run();
377+
rustc_driver::run_compiler(args, callbacks);
381378
Ok(())
382379
});
383380
std::process::exit(exit_code)
@@ -468,8 +465,7 @@ fn main() {
468465
// If the environment asks us to actually be rustc, then do that.
469466
if let Some(crate_kind) = env::var_os("MIRI_BE_RUSTC") {
470467
// Earliest rustc setup.
471-
let using_internal_features =
472-
rustc_driver::install_ice_hook(rustc_driver::DEFAULT_BUG_REPORT_URL, |_| ());
468+
rustc_driver::install_ice_hook(rustc_driver::DEFAULT_BUG_REPORT_URL, |_| ());
473469
rustc_driver::init_rustc_env_logger(&early_dcx);
474470

475471
let target_crate = if crate_kind == "target" {
@@ -493,16 +489,11 @@ fn main() {
493489
}
494490

495491
// We cannot use `rustc_driver::main` as we want it to use `args` as the CLI arguments.
496-
run_compiler_and_exit(
497-
&args,
498-
&mut MiriBeRustCompilerCalls { target_crate },
499-
using_internal_features,
500-
)
492+
run_compiler_and_exit(&args, &mut MiriBeRustCompilerCalls { target_crate })
501493
}
502494

503495
// Add an ICE bug report hook.
504-
let using_internal_features =
505-
rustc_driver::install_ice_hook("https://github.com/rust-lang/miri/issues/new", |_| ());
496+
rustc_driver::install_ice_hook("https://github.com/rust-lang/miri/issues/new", |_| ());
506497

507498
// Init loggers the Miri way.
508499
init_early_loggers(&early_dcx);
@@ -736,9 +727,5 @@ fn main() {
736727

737728
debug!("rustc arguments: {:?}", rustc_args);
738729
debug!("crate arguments: {:?}", miri_config.args);
739-
run_compiler_and_exit(
740-
&rustc_args,
741-
&mut MiriCompilerCalls::new(miri_config, many_seeds),
742-
using_internal_features,
743-
)
730+
run_compiler_and_exit(&rustc_args, &mut MiriCompilerCalls::new(miri_config, many_seeds))
744731
}

0 commit comments

Comments
 (0)