}
define_tables! {
- kind: Table<DefIndex, LazyValue<EntryKind>>,
attributes: Table<DefIndex, LazyArray<ast::Attribute>>,
children: Table<DefIndex, LazyArray<DefIndex>>,
may_have_doc_links: Table<DefIndex, ()>,
variant_data: Table<DefIndex, LazyValue<VariantData>>,
assoc_container: Table<DefIndex, ty::AssocItemContainer>,
- macro_definition: Table<DefIndex, LazyValue<ast::MacroDef>>,
+ // Slot is full when macro is macro_rules.
+ macro_rules: Table<DefIndex, ()>,
+ macro_definition: Table<DefIndex, LazyValue<ast::MacArgs>>,
proc_macro: Table<DefIndex, MacroKind>,
- // Slot is full when there is a self parameter.
- fn_has_self_parameter: Table<DefIndex, ()>,
module_reexports: Table<DefIndex, LazyArray<ModChild>>,
}
-#[derive(Copy, Clone, MetadataEncodable, MetadataDecodable)]
-enum EntryKind {
- AnonConst,
- Const,
- Static,
- ForeignStatic,
- ForeignMod,
- ForeignType,
- GlobalAsm,
- Type,
- TypeParam,
- ConstParam,
- OpaqueTy,
- Enum,
- Field,
- Variant,
- Struct,
- Union,
- Fn,
- ForeignFn,
- Mod,
- MacroDef,
- ProcMacro,
- Closure,
- Generator,
- Trait,
- Impl,
- AssocFn,
- AssocType,
- AssocConst,
- TraitAlias,
-}
-
#[derive(TyEncodable, TyDecodable)]
struct VariantData {
ctor_kind: CtorKind,
trivially_parameterized_over_tcx! {
VariantData,
- EntryKind,
RawDefId,
TraitImpls,
IncoherentImpls,