]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_metadata/src/rmeta/mod.rs
Create trait_def table.
[rust.git] / compiler / rustc_metadata / src / rmeta / mod.rs
index c2d85efb15d92814fc1dd36ac8abde99b6c870fa..15e8693d71282f1d866b04c445e493dabb671188 100644 (file)
@@ -320,6 +320,7 @@ fn encode(&self, buf: &mut Encoder) -> LazyTables<'tcx> {
     asyncness: Table<DefIndex, Lazy!(hir::IsAsync)>,
     fn_arg_names: Table<DefIndex, Lazy!([Ident])>,
     generator_kind: Table<DefIndex, Lazy!(hir::GeneratorKind)>,
+    trait_def: Table<DefIndex, Lazy!(ty::TraitDef)>,
 
     trait_item_def_id: Table<DefIndex, Lazy<DefId>>,
     inherent_impls: Table<DefIndex, Lazy<[DefIndex]>>,
@@ -360,7 +361,7 @@ enum EntryKind {
     ProcMacro(MacroKind),
     Closure,
     Generator,
-    Trait(Lazy<TraitData>),
+    Trait,
     Impl,
     AssocFn(Lazy<AssocFnData>),
     AssocType(AssocContainer),
@@ -377,17 +378,6 @@ struct VariantData {
     is_non_exhaustive: bool,
 }
 
-#[derive(TyEncodable, TyDecodable)]
-struct TraitData {
-    unsafety: hir::Unsafety,
-    paren_sugar: bool,
-    has_auto_impl: bool,
-    is_marker: bool,
-    skip_array_during_method_dispatch: bool,
-    specialization_kind: ty::trait_def::TraitSpecializationKind,
-    must_implement_one_of: Option<Box<[Ident]>>,
-}
-
 /// Describes whether the container of an associated item
 /// is a trait or an impl and whether, in a trait, it has
 /// a default, or an in impl, whether it's marked "default".