pub fn get_def_kind<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> DefKind
Gets the kind of the definition. Can’t use def_kind directly because this crashes on the crate root.
def_kind