pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId)