Skip to content

Commit ac3c9a7

Browse files
committed
Remove EarlyErrorHandler argument from after_analysis callback
It is only used by miri which can create a new one using the Session.
1 parent 4c721e3 commit ac3c9a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/miri.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
5959

6060
fn after_analysis<'tcx>(
6161
&mut self,
62-
handler: &EarlyErrorHandler,
6362
_: &rustc_interface::interface::Compiler,
6463
queries: &'tcx rustc_interface::Queries<'tcx>,
6564
) -> Compilation {
@@ -68,7 +67,8 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
6867
tcx.sess.fatal("miri cannot be run on programs that fail compilation");
6968
}
7069

71-
init_late_loggers(handler, tcx);
70+
let handler = EarlyErrorHandler::new(tcx.sess.opts.error_format);
71+
init_late_loggers(&handler, tcx);
7272
if !tcx.crate_types().contains(&CrateType::Executable) {
7373
tcx.sess.fatal("miri only makes sense on bin crates");
7474
}

0 commit comments

Comments
 (0)