Remove has_errors check that has no effect

This commit is contained in:
Oli Scherer 2024-01-31 16:16:11 +00:00
parent cdaa12e3df
commit f7531f18b8

View File

@ -448,8 +448,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
// FIXME(effects)
let predicate_is_const = false;
if let Some(guar) = self.dcx().has_errors()
&& trait_predicate.references_error()
if let Err(guar) = trait_predicate.error_reported()
{
return guar;
}