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
|
@ -34,7 +34,7 @@ use rustc_ast::{
|
|||
use rustc_ast_pretty::pprust;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::{
|
||||
pluralize, Applicability, Diag, DiagCtxt, ErrorGuaranteed, FatalError, PErr, PResult,
|
||||
pluralize, Applicability, Diag, DiagCtxtHandle, ErrorGuaranteed, FatalError, PErr, PResult,
|
||||
Subdiagnostic,
|
||||
};
|
||||
use rustc_session::errors::ExprParenthesesNeeded;
|
||||
|
@ -240,7 +240,7 @@ impl<'a> DerefMut for SnapshotParser<'a> {
|
|||
}
|
||||
|
||||
impl<'a> Parser<'a> {
|
||||
pub fn dcx(&self) -> &'a DiagCtxt {
|
||||
pub fn dcx(&self) -> DiagCtxtHandle<'a> {
|
||||
self.psess.dcx()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue