@@ -56,12 +56,12 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
56
56
57
57
fn after_analysis < ' tcx > (
58
58
& mut self ,
59
- compiler : & rustc_interface:: interface:: Compiler ,
59
+ _ : & rustc_interface:: interface:: Compiler ,
60
60
queries : & ' tcx rustc_interface:: Queries < ' tcx > ,
61
61
) -> Compilation {
62
- compiler. session ( ) . abort_if_errors ( ) ;
63
-
64
62
queries. global_ctxt ( ) . unwrap ( ) . enter ( |tcx| {
63
+ tcx. sess . abort_if_errors ( ) ;
64
+
65
65
init_late_loggers ( tcx) ;
66
66
if !tcx. sess . crate_types ( ) . contains ( & CrateType :: Executable ) {
67
67
tcx. sess . fatal ( "miri only makes sense on bin crates" ) ;
@@ -75,7 +75,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
75
75
let mut config = self . miri_config . clone ( ) ;
76
76
77
77
// Add filename to `miri` arguments.
78
- config. args . insert ( 0 , compiler . io ( ) . input . filestem ( ) . to_string ( ) ) ;
78
+ config. args . insert ( 0 , tcx . sess . io . input . filestem ( ) . to_string ( ) ) ;
79
79
80
80
// Adjust working directory for interpretation.
81
81
if let Some ( cwd) = env:: var_os ( "MIRI_CWD" ) {
@@ -87,10 +87,9 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
87
87
i32:: try_from ( return_code) . expect ( "Return value was too large!" ) ,
88
88
) ;
89
89
}
90
+ tcx. sess . abort_if_errors ( ) ;
90
91
} ) ;
91
92
92
- compiler. session ( ) . abort_if_errors ( ) ;
93
-
94
93
Compilation :: Stop
95
94
}
96
95
}
0 commit comments