@@ -27,7 +27,7 @@ struct MiriCompilerCalls {
2727impl rustc_driver:: Callbacks for MiriCompilerCalls {
2828 fn after_parsing ( & mut self , compiler : & interface:: Compiler ) -> bool {
2929 let attr = (
30- String :: from ( "miri" ) ,
30+ syntax :: symbol :: Symbol :: intern ( "miri" ) ,
3131 syntax:: feature_gate:: AttributeType :: Whitelisted ,
3232 ) ;
3333 compiler. session ( ) . plugin_attributes . borrow_mut ( ) . push ( attr) ;
@@ -66,26 +66,26 @@ fn init_early_loggers() {
6666 // If it is not set, we avoid initializing now so that we can initialize
6767 // later with our custom settings, and *not* log anything for what happens before
6868 // `miri` gets started.
69- if env:: var ( "RUST_LOG " ) . is_ok ( ) {
69+ if env:: var ( "RUSTC_LOG " ) . is_ok ( ) {
7070 rustc_driver:: init_rustc_env_logger ( ) ;
7171 }
7272}
7373
7474fn init_late_loggers ( ) {
75- // We initialize loggers right before we start evaluation. We overwrite the `RUST_LOG `
75+ // We initialize loggers right before we start evaluation. We overwrite the `RUSTC_LOG `
7676 // env var if it is not set, control it based on `MIRI_LOG`.
7777 if let Ok ( var) = env:: var ( "MIRI_LOG" ) {
78- if env:: var ( "RUST_LOG " ) . is_err ( ) {
78+ if env:: var ( "RUSTC_LOG " ) . is_err ( ) {
7979 // We try to be a bit clever here: if `MIRI_LOG` is just a single level
8080 // used for everything, we only apply it to the parts of rustc that are
81- // CTFE-related. Otherwise, we use it verbatim for `RUST_LOG `.
81+ // CTFE-related. Otherwise, we use it verbatim for `RUSTC_LOG `.
8282 // This way, if you set `MIRI_LOG=trace`, you get only the right parts of
8383 // rustc traced, but you can also do `MIRI_LOG=miri=trace,rustc_mir::interpret=debug`.
8484 if log:: Level :: from_str ( & var) . is_ok ( ) {
85- env:: set_var ( "RUST_LOG " ,
85+ env:: set_var ( "RUSTC_LOG " ,
8686 & format ! ( "rustc::mir::interpret={0},rustc_mir::interpret={0}" , var) ) ;
8787 } else {
88- env:: set_var ( "RUST_LOG " , & var) ;
88+ env:: set_var ( "RUSTC_LOG " , & var) ;
8989 }
9090 rustc_driver:: init_rustc_env_logger ( ) ;
9191 }
0 commit comments