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:
parent
c91edc3888
commit
7ba82d61eb
77 changed files with 363 additions and 328 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue