Skip to content

Commit

Permalink
Rollup merge of #115730 - bjorn3:some_driver_refactors, r=compiler-er…
Browse files Browse the repository at this point in the history
…rors

Some more small driver refactors

To improve clarity and simplify some code.
  • Loading branch information
matthiaskrgr authored Sep 11, 2023
2 parents aad7f60 + ac3c9a7 commit 3035118
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {

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

init_late_loggers(handler, tcx);
let handler = EarlyErrorHandler::new(tcx.sess.opts.error_format);
init_late_loggers(&handler, tcx);
if !tcx.crate_types().contains(&CrateType::Executable) {
tcx.sess.fatal("miri only makes sense on bin crates");
}
Expand Down

0 comments on commit 3035118

Please sign in to comment.