Remove a has_errors check that does not prevent follow up error noise

This commit is contained in:
Oli Scherer 2024-01-31 16:27:58 +00:00
parent a6b1e433da
commit 28f250d6a6
5 changed files with 21 additions and 8 deletions

View file

@ -2641,10 +2641,6 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
if let Some(e) = self.tainted_by_errors() {
return e;
}
if let Some(e) = self.dcx().has_errors() {
// no need to overload user in such cases
return e;
}
let SubtypePredicate { a_is_expected: _, a, b } = data;
// both must be type variables, or the other would've been instantiated
assert!(a.is_ty_var() && b.is_ty_var());