1
1
use crate :: rmeta:: * ;
2
- use crate :: rmeta:: table:: { FixedSizeEncoding , Table } ;
2
+ use crate :: rmeta:: table:: { FixedSizeEncoding , TableBuilder } ;
3
3
4
4
use rustc:: middle:: cstore:: { LinkagePreference , NativeLibrary ,
5
5
EncodedMetadata , ForeignModule } ;
@@ -47,7 +47,7 @@ struct EncodeContext<'tcx> {
47
47
opaque : opaque:: Encoder ,
48
48
tcx : TyCtxt < ' tcx > ,
49
49
50
- per_def : PerDefTables < ' tcx > ,
50
+ per_def : PerDefTableBuilders < ' tcx > ,
51
51
52
52
lazy_state : LazyState ,
53
53
type_shorthands : FxHashMap < Ty < ' tcx > , usize > ,
@@ -61,27 +61,27 @@ struct EncodeContext<'tcx> {
61
61
}
62
62
63
63
#[ 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 > > > > ,
85
85
}
86
86
87
87
macro_rules! encoder_methods {
0 commit comments