Remove a has_errors check that doesn't actually prevent noisy follow up errors

This commit is contained in:
Oli Scherer 2024-01-31 16:34:10 +00:00
parent 28f250d6a6
commit d31905c904
3 changed files with 10 additions and 6 deletions

View file

@ -2720,10 +2720,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;
}
struct_span_code_err!(
self.dcx(),
span,