diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-18 10:35:56 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-18 15:42:11 +0000 |
| commit | 7ba82d61eb519c9c8cb8c47a3030a2bd2faaa186 (patch) | |
| tree | 552d7e4c38b78bc5f364f089383d1517a96ca608 /compiler/rustc_session/src/parse.rs | |
| parent | c91edc3888073d0ddf2e0ff7741437e483a4f21e (diff) | |
| download | rust-7ba82d61eb519c9c8cb8c47a3030a2bd2faaa186.tar.gz rust-7ba82d61eb519c9c8cb8c47a3030a2bd2faaa186.zip | |
Use a dedicated type instead of a reference for the diagnostic context
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
Diffstat (limited to 'compiler/rustc_session/src/parse.rs')
| -rw-r--r-- | compiler/rustc_session/src/parse.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index 4e5ee39ffb9..a238d6e6ac4 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -15,8 +15,8 @@ use rustc_data_structures::fx::{FxHashMap, FxIndexMap, FxIndexSet}; use rustc_data_structures::sync::{AppendOnlyVec, Lock, Lrc}; use rustc_errors::emitter::{stderr_destination, HumanEmitter, SilentEmitter}; use rustc_errors::{ - fallback_fluent_bundle, ColorConfig, Diag, DiagCtxt, DiagMessage, EmissionGuarantee, MultiSpan, - StashKey, + fallback_fluent_bundle, ColorConfig, Diag, DiagCtxt, DiagCtxtHandle, DiagMessage, + EmissionGuarantee, MultiSpan, StashKey, }; use rustc_feature::{find_feature_issue, GateIssue, UnstableFeatures}; use rustc_span::edition::Edition; @@ -327,7 +327,7 @@ impl ParseSess { self.proc_macro_quoted_spans.iter_enumerated() } - pub fn dcx(&self) -> &DiagCtxt { - &self.dcx + pub fn dcx(&self) -> DiagCtxtHandle<'_> { + self.dcx.handle() } } |
