1
Fork 0

Don't fire refinement lint if there are errors

This commit is contained in:
Michael Goulet 2024-09-29 13:49:53 -04:00 committed by Jubilee Young
parent 36076ecdc7
commit 322c4bdac5

View file

@ -64,6 +64,10 @@ pub(super) fn check_refining_return_position_impl_trait_in_trait<'tcx>(
return;
};
if hidden_tys.items().any(|(_, &ty)| ty.skip_binder().references_error()) {
return;
}
let mut collector = ImplTraitInTraitCollector { tcx, types: FxIndexSet::default() };
trait_m_sig.visit_with(&mut collector);