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
|
@ -5,7 +5,7 @@
|
|||
//! it finds operations that are invalid in a certain context.
|
||||
|
||||
use rustc_attr as attr;
|
||||
use rustc_errors::DiagCtxt;
|
||||
use rustc_errors::DiagCtxtHandle;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_middle::bug;
|
||||
|
@ -46,7 +46,7 @@ impl<'mir, 'tcx> ConstCx<'mir, 'tcx> {
|
|||
ConstCx { body, tcx, param_env, const_kind }
|
||||
}
|
||||
|
||||
pub(crate) fn dcx(&self) -> &'tcx DiagCtxt {
|
||||
pub(crate) fn dcx(&self) -> DiagCtxtHandle<'tcx> {
|
||||
self.tcx.dcx()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue