@@ -72,6 +72,7 @@ struct PerDefTables<'tcx> {
72
72
73
73
ty : PerDefTable < Lazy < Ty < ' tcx > > > ,
74
74
fn_sig : PerDefTable < Lazy < ty:: PolyFnSig < ' tcx > > > ,
75
+ impl_trait_ref : PerDefTable < Lazy < ty:: TraitRef < ' tcx > > > ,
75
76
inherent_impls : PerDefTable < Lazy < [ DefIndex ] > > ,
76
77
variances : PerDefTable < Lazy < [ ty:: Variance ] > > ,
77
78
generics : PerDefTable < Lazy < ty:: Generics > > ,
@@ -511,6 +512,7 @@ impl<'tcx> EncodeContext<'tcx> {
511
512
512
513
ty : self . per_def . ty . encode ( & mut self . opaque ) ,
513
514
fn_sig : self . per_def . fn_sig . encode ( & mut self . opaque ) ,
515
+ impl_trait_ref : self . per_def . impl_trait_ref . encode ( & mut self . opaque ) ,
514
516
inherent_impls : self . per_def . inherent_impls . encode ( & mut self . opaque ) ,
515
517
variances : self . per_def . variances . encode ( & mut self . opaque ) ,
516
518
generics : self . per_def . generics . encode ( & mut self . opaque ) ,
@@ -1152,7 +1154,6 @@ impl EncodeContext<'tcx> {
1152
1154
defaultness,
1153
1155
parent_impl: parent,
1154
1156
coerce_unsized_info,
1155
- trait_ref: trait_ref. map( |trait_ref| self . lazy( trait_ref) ) ,
1156
1157
} ;
1157
1158
1158
1159
EntryKind :: Impl ( self . lazy( data) )
@@ -1226,6 +1227,11 @@ impl EncodeContext<'tcx> {
1226
1227
if let hir:: ItemKind :: Fn ( ..) = item. kind {
1227
1228
record ! ( self . per_def. fn_sig[ def_id] <- tcx. fn_sig( def_id) ) ;
1228
1229
}
1230
+ if let hir:: ItemKind :: Impl ( ..) = item. kind {
1231
+ if let Some ( trait_ref) = self . tcx . impl_trait_ref ( def_id) {
1232
+ record ! ( self . per_def. impl_trait_ref[ def_id] <- trait_ref) ;
1233
+ }
1234
+ }
1229
1235
self . encode_inherent_implementations ( def_id) ;
1230
1236
match item. kind {
1231
1237
hir:: ItemKind :: Enum ( ..) |
0 commit comments