Skip to content

Commit 322c4bd

Browse files
compiler-errorsworkingjubilee
authored andcommitted
Don't fire refinement lint if there are errors
1 parent 36076ec commit 322c4bd

File tree

1 file changed

+4
-0
lines changed
  • compiler/rustc_hir_analysis/src/check/compare_impl_item

1 file changed

+4
-0
lines changed

compiler/rustc_hir_analysis/src/check/compare_impl_item/refine.rs

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ pub(super) fn check_refining_return_position_impl_trait_in_trait<'tcx>(
6464
return;
6565
};
6666

67+
if hidden_tys.items().any(|(_, &ty)| ty.skip_binder().references_error()) {
68+
return;
69+
}
70+
6771
let mut collector = ImplTraitInTraitCollector { tcx, types: FxIndexSet::default() };
6872
trait_m_sig.visit_with(&mut collector);
6973

0 commit comments

Comments
 (0)