]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_metadata/src/rmeta/mod.rs
Rollup merge of #101429 - compiler-errors:issue-101119, r=lcnr
[rust.git] / compiler / rustc_metadata / src / rmeta / mod.rs
index d69fb347191444183667e39b5886b75226d59ba9..6f849a58580e679550216f06ff690d75e11a8a8f 100644 (file)
@@ -334,7 +334,6 @@ fn encode(&self, buf: &mut FileEncoder) -> LazyTables {
 }
 
 define_tables! {
-    kind: Table<DefIndex, LazyValue<EntryKind>>,
     attributes: Table<DefIndex, LazyArray<ast::Attribute>>,
     children: Table<DefIndex, LazyArray<DefIndex>>,
 
@@ -395,46 +394,13 @@ fn encode(&self, buf: &mut FileEncoder) -> LazyTables {
     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,
@@ -466,7 +432,6 @@ pub fn provide(providers: &mut Providers) {
 
 trivially_parameterized_over_tcx! {
     VariantData,
-    EntryKind,
     RawDefId,
     TraitImpls,
     IncoherentImpls,