From 072bf482c98d0f33d8456c6000babf315b63e104 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 12 Sep 2024 13:16:21 +1000 Subject: [PATCH] Remove unnecessary lifetime from `RunCompiler`. This does change the external interface, but not in a way that will cause any breakage because external users don't mention the lifetimes. --- compiler/rustc_driver_impl/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 1b7ca61cee8..9d4061d16a1 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -207,17 +207,17 @@ pub fn diagnostics_registry() -> Registry { } /// This is the primary entry point for rustc. -pub struct RunCompiler<'a, 'b> { +pub struct RunCompiler<'a> { at_args: &'a [String], - callbacks: &'b mut (dyn Callbacks + Send), + callbacks: &'a mut (dyn Callbacks + Send), file_loader: Option>, make_codegen_backend: Option Box + Send>>, using_internal_features: Arc, } -impl<'a, 'b> RunCompiler<'a, 'b> { - pub fn new(at_args: &'a [String], callbacks: &'b mut (dyn Callbacks + Send)) -> Self { +impl<'a> RunCompiler<'a> { + pub fn new(at_args: &'a [String], callbacks: &'a mut (dyn Callbacks + Send)) -> Self { Self { at_args, callbacks,