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
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user