about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-09-11 21:16:22 +0200
committerGitHub <noreply@github.com>2023-09-11 21:16:22 +0200
commitc943ec2fba30a1ab4d9a60b46036ffa0c71fe6f3 (patch)
treec4c94329d7e0b15633a9b1bf82ce1ac4787f146a /src
parent279e2576a0f8e9667d2e7ee82bd8edaadf1c0999 (diff)
parent2eca717a240a37e4e996d727b6506d2f2e990b74 (diff)
Rollup merge of #115730 - bjorn3:some_driver_refactors, r=compiler-errors
Some more small driver refactors

To improve clarity and simplify some code.
Diffstat (limited to 'src')
-rw-r--r--src/tools/miri/src/bin/miri.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs
index 97718f1f4a9..1e9219d4bb2 100644
--- a/src/tools/miri/src/bin/miri.rs
+++ b/src/tools/miri/src/bin/miri.rs
@@ -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 {
@@ -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");
             }