@@ -241,6 +241,7 @@ fn run_compiler(
241241 mut args : Vec < String > ,
242242 target_crate : bool ,
243243 callbacks : & mut ( dyn rustc_driver:: Callbacks + Send ) ,
244+ using_internal_features : std:: sync:: Arc < std:: sync:: atomic:: AtomicBool >
244245) -> ! {
245246 if target_crate {
246247 // Miri needs a custom sysroot for target crates.
@@ -273,7 +274,8 @@ fn run_compiler(
273274
274275 // Invoke compiler, and handle return code.
275276 let exit_code = rustc_driver:: catch_with_exit_code ( move || {
276- rustc_driver:: RunCompiler :: new ( & args, callbacks) . run ( )
277+ rustc_driver:: RunCompiler :: new ( & args, callbacks)
278+ . set_using_internal_features ( using_internal_features) . run ( )
277279 } ) ;
278280 std:: process:: exit ( exit_code)
279281}
@@ -295,7 +297,7 @@ fn main() {
295297 // If the environment asks us to actually be rustc, then do that.
296298 if let Some ( crate_kind) = env:: var_os ( "MIRI_BE_RUSTC" ) {
297299 // Earliest rustc setup.
298- rustc_driver:: install_ice_hook ( rustc_driver:: DEFAULT_BUG_REPORT_URL , |_| ( ) ) ;
300+ let using_internal_features = rustc_driver:: install_ice_hook ( rustc_driver:: DEFAULT_BUG_REPORT_URL , |_| ( ) ) ;
299301 rustc_driver:: init_rustc_env_logger ( & handler) ;
300302
301303 let target_crate = if crate_kind == "target" {
@@ -311,11 +313,12 @@ fn main() {
311313 env:: args ( ) . collect ( ) ,
312314 target_crate,
313315 & mut MiriBeRustCompilerCalls { target_crate } ,
316+ using_internal_features,
314317 )
315318 }
316319
317320 // Add an ICE bug report hook.
318- rustc_driver:: install_ice_hook ( "https://github.com/rust-lang/miri/issues/new" , |_| ( ) ) ;
321+ let using_internal_features = rustc_driver:: install_ice_hook ( "https://github.com/rust-lang/miri/issues/new" , |_| ( ) ) ;
319322
320323 // Init loggers the Miri way.
321324 init_early_loggers ( & handler) ;
@@ -578,5 +581,5 @@ fn main() {
578581
579582 debug ! ( "rustc arguments: {:?}" , rustc_args) ;
580583 debug ! ( "crate arguments: {:?}" , miri_config. args) ;
581- run_compiler ( rustc_args, /* target_crate: */ true , & mut MiriCompilerCalls { miri_config } )
584+ run_compiler ( rustc_args, /* target_crate: */ true , & mut MiriCompilerCalls { miri_config } , using_internal_features )
582585}
0 commit comments