Skip to content

Commit

Permalink
Don't fire refinement lint if there are errors
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors authored and workingjubilee committed Oct 10, 2024
1 parent 36076ec commit 322c4bd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 322c4bd

Please sign in to comment.