Track ErrorGuaranteed instead of conjuring it from thin air

This commit is contained in:
Oli Scherer 2024-01-25 17:19:12 +00:00
parent 3042da0248
commit 054e1e3aad
2 changed files with 22 additions and 12 deletions

View file

@ -278,7 +278,8 @@ pub struct InferCtxt<'tcx> {
/// The set of predicates on which errors have been reported, to
/// avoid reporting the same error twice.
pub reported_trait_errors: RefCell<FxIndexMap<Span, Vec<ty::Predicate<'tcx>>>>,
pub reported_trait_errors:
RefCell<FxIndexMap<Span, (Vec<ty::Predicate<'tcx>>, ErrorGuaranteed)>>,
pub reported_signature_mismatch: RefCell<FxHashSet<(Span, Option<Span>)>>,