Automatically taint when reporting errors from ItemCtxt
This commit is contained in:
parent
cd3d98b3be
commit
fd9a92542c
26 changed files with 183 additions and 374 deletions
|
@ -18,7 +18,9 @@ use rustc_ast::Recovered;
|
|||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
|
||||
use rustc_data_structures::unord::UnordMap;
|
||||
use rustc_errors::{struct_span_code_err, Applicability, Diag, ErrorGuaranteed, StashKey, E0228};
|
||||
use rustc_errors::{
|
||||
struct_span_code_err, Applicability, Diag, DiagCtxtHandle, ErrorGuaranteed, StashKey, E0228,
|
||||
};
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_hir::intravisit::{self, walk_generics, Visitor};
|
||||
|
@ -370,6 +372,10 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> {
|
|||
self.tcx
|
||||
}
|
||||
|
||||
fn dcx(&self) -> DiagCtxtHandle<'_> {
|
||||
self.tcx.dcx().taintable_handle(&self.tainted_by_errors)
|
||||
}
|
||||
|
||||
fn item_def_id(&self) -> LocalDefId {
|
||||
self.item_def_id
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue