@@ -29,8 +29,8 @@ use std::num::NonZero;
2929use std:: ops:: Range ;
3030use std:: path:: PathBuf ;
3131use std:: str:: FromStr ;
32+ use std:: sync:: Once ;
3233use std:: sync:: atomic:: { AtomicI32 , Ordering } ;
33- use std:: sync:: { Arc , Once } ;
3434
3535use miri:: {
3636 BacktraceStyle , BorrowTrackerMethod , MiriConfig , MiriEntryFnType , ProvenanceMode , RetagFields ,
@@ -371,13 +371,10 @@ fn init_late_loggers(early_dcx: &EarlyDiagCtxt, tcx: TyCtxt<'_>) {
371371fn 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