11use crate :: rmeta:: * ;
2- use crate :: rmeta:: table:: { FixedSizeEncoding , Table } ;
2+ use crate :: rmeta:: table:: { FixedSizeEncoding , TableBuilder } ;
33
44use rustc:: middle:: cstore:: { LinkagePreference , NativeLibrary ,
55 EncodedMetadata , ForeignModule } ;
@@ -47,7 +47,7 @@ struct EncodeContext<'tcx> {
4747 opaque : opaque:: Encoder ,
4848 tcx : TyCtxt < ' tcx > ,
4949
50- per_def : PerDefTables < ' tcx > ,
50+ per_def : PerDefTableBuilders < ' tcx > ,
5151
5252 lazy_state : LazyState ,
5353 type_shorthands : FxHashMap < Ty < ' tcx > , usize > ,
@@ -61,27 +61,27 @@ struct EncodeContext<'tcx> {
6161}
6262
6363#[ derive( Default ) ]
64- struct PerDefTables < ' tcx > {
65- kind : Table < DefIndex , Lazy < EntryKind < ' tcx > > > ,
66- visibility : Table < DefIndex , Lazy < ty:: Visibility > > ,
67- span : Table < DefIndex , Lazy < Span > > ,
68- attributes : Table < DefIndex , Lazy < [ ast:: Attribute ] > > ,
69- children : Table < DefIndex , Lazy < [ DefIndex ] > > ,
70- stability : Table < DefIndex , Lazy < attr:: Stability > > ,
71- deprecation : Table < DefIndex , Lazy < attr:: Deprecation > > ,
72-
73- ty : Table < DefIndex , Lazy < Ty < ' tcx > > > ,
74- fn_sig : Table < DefIndex , Lazy < ty:: PolyFnSig < ' tcx > > > ,
75- impl_trait_ref : Table < DefIndex , Lazy < ty:: TraitRef < ' tcx > > > ,
76- inherent_impls : Table < DefIndex , Lazy < [ DefIndex ] > > ,
77- variances : Table < DefIndex , Lazy < [ ty:: Variance ] > > ,
78- generics : Table < DefIndex , Lazy < ty:: Generics > > ,
79- explicit_predicates : Table < DefIndex , Lazy < ty:: GenericPredicates < ' tcx > > > ,
80- inferred_outlives : Table < DefIndex , Lazy < & ' tcx [ ( ty:: Predicate < ' tcx > , Span ) ] > > ,
81- super_predicates : Table < DefIndex , Lazy < ty:: GenericPredicates < ' tcx > > > ,
82-
83- mir : Table < DefIndex , Lazy < mir:: Body < ' tcx > > > ,
84- promoted_mir : Table < DefIndex , Lazy < IndexVec < mir:: Promoted , mir:: Body < ' tcx > > > > ,
64+ struct PerDefTableBuilders < ' tcx > {
65+ kind : TableBuilder < DefIndex , Lazy < EntryKind < ' tcx > > > ,
66+ visibility : TableBuilder < DefIndex , Lazy < ty:: Visibility > > ,
67+ span : TableBuilder < DefIndex , Lazy < Span > > ,
68+ attributes : TableBuilder < DefIndex , Lazy < [ ast:: Attribute ] > > ,
69+ children : TableBuilder < DefIndex , Lazy < [ DefIndex ] > > ,
70+ stability : TableBuilder < DefIndex , Lazy < attr:: Stability > > ,
71+ deprecation : TableBuilder < DefIndex , Lazy < attr:: Deprecation > > ,
72+
73+ ty : TableBuilder < DefIndex , Lazy < Ty < ' tcx > > > ,
74+ fn_sig : TableBuilder < DefIndex , Lazy < ty:: PolyFnSig < ' tcx > > > ,
75+ impl_trait_ref : TableBuilder < DefIndex , Lazy < ty:: TraitRef < ' tcx > > > ,
76+ inherent_impls : TableBuilder < DefIndex , Lazy < [ DefIndex ] > > ,
77+ variances : TableBuilder < DefIndex , Lazy < [ ty:: Variance ] > > ,
78+ generics : TableBuilder < DefIndex , Lazy < ty:: Generics > > ,
79+ explicit_predicates : TableBuilder < DefIndex , Lazy < ty:: GenericPredicates < ' tcx > > > ,
80+ inferred_outlives : TableBuilder < DefIndex , Lazy < & ' tcx [ ( ty:: Predicate < ' tcx > , Span ) ] > > ,
81+ super_predicates : TableBuilder < DefIndex , Lazy < ty:: GenericPredicates < ' tcx > > > ,
82+
83+ mir : TableBuilder < DefIndex , Lazy < mir:: Body < ' tcx > > > ,
84+ promoted_mir : TableBuilder < DefIndex , Lazy < IndexVec < mir:: Promoted , mir:: Body < ' tcx > > > > ,
8585}
8686
8787macro_rules! encoder_methods {
0 commit comments