InferCtxt::is_tainted_by_errors
returns ErrorGuaranteed
This commit is contained in:
parent
c1ec8ff14d
commit
9c510048fd
10 changed files with 33 additions and 35 deletions
|
@ -19,7 +19,7 @@ extern crate tracing;
|
|||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::graph::dominators::Dominators;
|
||||
use rustc_data_structures::vec_map::VecMap;
|
||||
use rustc_errors::{Diagnostic, DiagnosticBuilder, ErrorGuaranteed};
|
||||
use rustc_errors::{Diagnostic, DiagnosticBuilder};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_index::bit_set::ChunkedBitSet;
|
||||
|
|
|
@ -219,8 +219,8 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
|
|||
instantiated_ty: OpaqueHiddenType<'tcx>,
|
||||
origin: OpaqueTyOrigin,
|
||||
) -> Ty<'tcx> {
|
||||
if self.is_tainted_by_errors() {
|
||||
return self.tcx.ty_error();
|
||||
if let Some(e) = self.is_tainted_by_errors() {
|
||||
return self.tcx.ty_error_with_guaranteed(e);
|
||||
}
|
||||
|
||||
let definition_ty = instantiated_ty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue