@@ -30,7 +30,7 @@ use std::ops::Range;
3030use std:: path:: PathBuf ;
3131use std:: str:: FromStr ;
3232use std:: sync:: atomic:: { AtomicI32 , Ordering } ;
33- use std:: sync:: { Arc , Once } ;
33+ use std:: sync:: Once ;
3434
3535use miri:: {
3636 BacktraceStyle , BorrowTrackerMethod , MiriConfig , MiriEntryFnType , ProvenanceMode , RetagFields , ValidationMode ,
@@ -370,13 +370,10 @@ fn init_late_loggers(early_dcx: &EarlyDiagCtxt, tcx: TyCtxt<'_>) {
370370fn run_compiler_and_exit (
371371 args : & [ String ] ,
372372 callbacks : & mut ( dyn rustc_driver:: Callbacks + Send ) ,
373- using_internal_features : Arc < std:: sync:: atomic:: AtomicBool > ,
374373) -> ! {
375374 // Invoke compiler, and handle return code.
376375 let exit_code = rustc_driver:: catch_with_exit_code ( move || {
377- rustc_driver:: RunCompiler :: new ( args, callbacks)
378- . set_using_internal_features ( using_internal_features)
379- . run ( ) ;
376+ rustc_driver:: run_compiler ( args, callbacks) ;
380377 Ok ( ( ) )
381378 } ) ;
382379 std:: process:: exit ( exit_code)
@@ -467,8 +464,7 @@ fn main() {
467464 // If the environment asks us to actually be rustc, then do that.
468465 if let Some ( crate_kind) = env:: var_os ( "MIRI_BE_RUSTC" ) {
469466 // Earliest rustc setup.
470- let using_internal_features =
471- rustc_driver:: install_ice_hook ( rustc_driver:: DEFAULT_BUG_REPORT_URL , |_| ( ) ) ;
467+ rustc_driver:: install_ice_hook ( rustc_driver:: DEFAULT_BUG_REPORT_URL , |_| ( ) ) ;
472468 rustc_driver:: init_rustc_env_logger ( & early_dcx) ;
473469
474470 let target_crate = if crate_kind == "target" {
@@ -492,16 +488,11 @@ fn main() {
492488 }
493489
494490 // We cannot use `rustc_driver::main` as we want it to use `args` as the CLI arguments.
495- run_compiler_and_exit (
496- & args,
497- & mut MiriBeRustCompilerCalls { target_crate } ,
498- using_internal_features,
499- )
491+ run_compiler_and_exit ( & args, & mut MiriBeRustCompilerCalls { target_crate } )
500492 }
501493
502494 // Add an ICE bug report hook.
503- let using_internal_features =
504- rustc_driver:: install_ice_hook ( "https://github.com/rust-lang/miri/issues/new" , |_| ( ) ) ;
495+ rustc_driver:: install_ice_hook ( "https://github.com/rust-lang/miri/issues/new" , |_| ( ) ) ;
505496
506497 // Init loggers the Miri way.
507498 init_early_loggers ( & early_dcx) ;
@@ -735,9 +726,5 @@ fn main() {
735726
736727 debug ! ( "rustc arguments: {:?}" , rustc_args) ;
737728 debug ! ( "crate arguments: {:?}" , miri_config. args) ;
738- run_compiler_and_exit (
739- & rustc_args,
740- & mut MiriCompilerCalls :: new ( miri_config, many_seeds) ,
741- using_internal_features,
742- )
729+ run_compiler_and_exit ( & rustc_args, & mut MiriCompilerCalls :: new ( miri_config, many_seeds) )
743730}
0 commit comments