about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/lexer/mod.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-06-18 10:35:56 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-06-18 15:42:11 +0000
commit7ba82d61eb519c9c8cb8c47a3030a2bd2faaa186 (patch)
tree552d7e4c38b78bc5f364f089383d1517a96ca608 /compiler/rustc_parse/src/lexer/mod.rs
parentc91edc3888073d0ddf2e0ff7741437e483a4f21e (diff)
downloadrust-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_parse/src/lexer/mod.rs')
-rw-r--r--compiler/rustc_parse/src/lexer/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs
index a5b9ab32a8c..511805cf8d6 100644
--- a/compiler/rustc_parse/src/lexer/mod.rs
+++ b/compiler/rustc_parse/src/lexer/mod.rs
@@ -7,7 +7,7 @@ use rustc_ast::ast::{self, AttrStyle};
 use rustc_ast::token::{self, CommentKind, Delimiter, IdentIsRaw, Token, TokenKind};
 use rustc_ast::tokenstream::TokenStream;
 use rustc_ast::util::unicode::contains_text_flow_control_chars;
-use rustc_errors::{codes::*, Applicability, Diag, DiagCtxt, StashKey};
+use rustc_errors::{codes::*, Applicability, Diag, DiagCtxtHandle, StashKey};
 use rustc_lexer::unescape::{self, EscapeError, Mode};
 use rustc_lexer::{Base, DocStyle, RawStrError};
 use rustc_lexer::{Cursor, LiteralKind};
@@ -113,7 +113,7 @@ struct StringReader<'psess, 'src> {
 }
 
 impl<'psess, 'src> StringReader<'psess, 'src> {
-    fn dcx(&self) -> &'psess DiagCtxt {
+    fn dcx(&self) -> DiagCtxtHandle<'psess> {
         self.psess.dcx()
     }