1
Fork 0

Keep error types around, even in obligations.

These help silence follow up errors
This commit is contained in:
Oli Scherer 2024-01-10 16:34:54 +00:00
parent 3a6bf351a3
commit fb44c848c3
9 changed files with 22 additions and 55 deletions

View file

@ -631,13 +631,6 @@ impl<'tcx> InferCtxt<'tcx> {
ct_op: |ct| ct,
});
if let ty::ClauseKind::Projection(projection) = predicate.kind().skip_binder() {
if projection.term.references_error() {
// No point on adding any obligations since there's a type error involved.
obligations.clear();
return;
}
}
// Require that the predicate holds for the concrete type.
debug!(?predicate);
obligations.push(traits::Obligation::new(