@@ -72,6 +72,7 @@ struct PerDefTables<'tcx> {
7272
7373 ty : PerDefTable < Lazy < Ty < ' tcx > > > ,
7474 fn_sig : PerDefTable < Lazy < ty:: PolyFnSig < ' tcx > > > ,
75+ impl_trait_ref : PerDefTable < Lazy < ty:: TraitRef < ' tcx > > > ,
7576 inherent_impls : PerDefTable < Lazy < [ DefIndex ] > > ,
7677 variances : PerDefTable < Lazy < [ ty:: Variance ] > > ,
7778 generics : PerDefTable < Lazy < ty:: Generics > > ,
@@ -511,6 +512,7 @@ impl<'tcx> EncodeContext<'tcx> {
511512
512513 ty : self . per_def . ty . encode ( & mut self . opaque ) ,
513514 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 ) ,
514516 inherent_impls : self . per_def . inherent_impls . encode ( & mut self . opaque ) ,
515517 variances : self . per_def . variances . encode ( & mut self . opaque ) ,
516518 generics : self . per_def . generics . encode ( & mut self . opaque ) ,
@@ -1152,7 +1154,6 @@ impl EncodeContext<'tcx> {
11521154 defaultness,
11531155 parent_impl: parent,
11541156 coerce_unsized_info,
1155- trait_ref: trait_ref. map( |trait_ref| self . lazy( trait_ref) ) ,
11561157 } ;
11571158
11581159 EntryKind :: Impl ( self . lazy( data) )
@@ -1226,6 +1227,11 @@ impl EncodeContext<'tcx> {
12261227 if let hir:: ItemKind :: Fn ( ..) = item. kind {
12271228 record ! ( self . per_def. fn_sig[ def_id] <- tcx. fn_sig( def_id) ) ;
12281229 }
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+ }
12291235 self . encode_inherent_implementations ( def_id) ;
12301236 match item. kind {
12311237 hir:: ItemKind :: Enum ( ..) |
0 commit comments