fn emit_orphan_check_error<'tcx>(
    tcx: TyCtxt<'tcx>,
    sp: Span,
    full_impl_span: Span,
    trait_span: Span,
    trait_ref: TraitRef<'tcx>,
    self_ty_span: Span,
    generics: &Generics<'tcx>,
    err: OrphanCheckErr<'tcx>
) -> Result<!, ErrorGuaranteed>