fn adt_kind -> wfcheck

This commit is contained in:
Mazdak Farrokhzad 2019-12-24 05:12:01 +01:00
parent cd8377d37e
commit c19ed3bc5b
2 changed files with 13 additions and 13 deletions

View file

@ -12,7 +12,6 @@ use crate::hir::def::{DefKind, Res};
use crate::hir::def_id::{DefId, DefIndex, LocalDefId, CRATE_DEF_INDEX};
use crate::mir::mono::Linkage;
use crate::ty::query::Providers;
use crate::ty::AdtKind;
use crate::util::nodemap::{FxHashSet, NodeMap};
use errors::FatalError;
@ -2550,15 +2549,6 @@ impl ItemKind<'_> {
}
}
pub fn adt_kind(&self) -> Option<AdtKind> {
match *self {
ItemKind::Struct(..) => Some(AdtKind::Struct),
ItemKind::Union(..) => Some(AdtKind::Union),
ItemKind::Enum(..) => Some(AdtKind::Enum),
_ => None,
}
}
pub fn generics(&self) -> Option<&Generics<'_>> {
Some(match *self {
ItemKind::Fn(_, ref generics, _)