diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index d6c58e9d1be..1db31f5b0a7 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -340,4 +340,8 @@ pub fn proc_macro_quoted_spans(&self) -> impl Iterator + ' pub fn dcx(&self) -> DiagCtxtHandle<'_> { self.dcx.handle() } + + pub fn set_dcx(&mut self, dcx: DiagCtxt) { + self.dcx = dcx; + } }