pub fn overlapping_impls<F1, F2, R>(
    tcx: TyCtxt<'_>,
    impl1_def_id: DefId,
    impl2_def_id: DefId,
    skip_leak_check: SkipLeakCheck,
    overlap_mode: OverlapMode,
    on_overlap: F1,
    no_overlap: F2
) -> Rwhere
    F1: FnOnce(OverlapResult<'_>) -> R,
    F2: FnOnce() -> R,
Expand description

If there are types that satisfy both impls, invokes on_overlap with a suitably-freshened ImplHeader with those types substituted. Otherwise, invokes no_overlap.