rustc_trait_selection::traits::coherence

Function compute_intercrate_ambiguity_causes

source
fn compute_intercrate_ambiguity_causes<'tcx>(
    infcx: &InferCtxt<'tcx>,
    obligations: &[PredicateObligation<'tcx>],
) -> FxIndexSet<IntercrateAmbiguityCause<'tcx>>
Expand description

Compute the intercrate_ambiguity_causes for the new solver using “proof trees”.

This is a bit scuffed but seems to be good enough, at least when looking at UI tests. Given that it is only used to improve diagnostics this is good enough. We can always improve it once there are test cases where it is currently not enough.