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