fn check_impl(
    tcx: TyCtxt<'_>,
    impl_def_id: LocalDefId,
    trait_ref: TraitRef<'_>,
    trait_def: &TraitDef
) -> Result<(), ErrorGuaranteed>