Skip to content

Commit f7531f1

Browse files
committed
Remove has_errors check that has no effect
1 parent cdaa12e commit f7531f1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
448448
// FIXME(effects)
449449
let predicate_is_const = false;
450450

451-
if let Some(guar) = self.dcx().has_errors()
452-
&& trait_predicate.references_error()
451+
if let Err(guar) = trait_predicate.error_reported()
453452
{
454453
return guar;
455454
}

0 commit comments

Comments
 (0)