Change DefKind::Static
to a struct variant
This commit is contained in:
parent
12e2846514
commit
9816915954
47 changed files with 90 additions and 86 deletions
|
@ -264,7 +264,7 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
|
|||
use rustc_hir::def::DefKind;
|
||||
match tcx.def_kind(def_id) {
|
||||
DefKind::Fn => ForeignItemKind::Fn(tables.fn_def(def_id)),
|
||||
DefKind::Static(..) => ForeignItemKind::Static(tables.static_def(def_id)),
|
||||
DefKind::Static { .. } => ForeignItemKind::Static(tables.static_def(def_id)),
|
||||
DefKind::ForeignTy => ForeignItemKind::Type(
|
||||
tables.intern_ty(rustc_middle::ty::Ty::new_foreign(tcx, def_id)),
|
||||
),
|
||||
|
|
|
@ -95,7 +95,7 @@ pub(crate) fn new_item_kind(kind: DefKind) -> ItemKind {
|
|||
DefKind::Const | DefKind::InlineConst | DefKind::AssocConst | DefKind::AnonConst => {
|
||||
ItemKind::Const
|
||||
}
|
||||
DefKind::Static(_) => ItemKind::Static,
|
||||
DefKind::Static { .. } => ItemKind::Static,
|
||||
DefKind::Ctor(_, rustc_hir::def::CtorKind::Const) => ItemKind::Ctor(CtorKind::Const),
|
||||
DefKind::Ctor(_, rustc_hir::def::CtorKind::Fn) => ItemKind::Ctor(CtorKind::Fn),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue