Rollup merge of #119818 - oli-obk:even_more_follow_up_errors3, r=compiler-errors
Silence some follow-up errors [3/x] this is one piece of the requested cleanups from https://github.com/rust-lang/rust/pull/117449 Keep error types around, even in obligations. These help silence follow-up errors, as we now figure out that some types (most notably inference variables) are equal to an error type. But it also allows figuring out more types in the presence of errors, possibly causing more errors.
This commit is contained in:
commit
73256c68b8
9 changed files with 22 additions and 55 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue