fn check_ty<'tcx>( tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, span: Span, ) -> Result<(), (Span, Cow<'static, str>)>