@@ -1326,11 +1326,11 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
13261326 let ast_item = tcx. hir ( ) . expect_trait_item ( def_id. expect_local ( ) ) ;
13271327 self . tables . impl_defaultness . set ( def_id. index , ast_item. defaultness ) ;
13281328 let trait_item = tcx. associated_item ( def_id) ;
1329+ self . tables . assoc_container . set ( def_id. index , trait_item. container ) ;
13291330
13301331 match trait_item. kind {
13311332 ty:: AssocKind :: Const => {
1332- let container = trait_item. container ;
1333- record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocConst ( container) ) ;
1333+ record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocConst ) ;
13341334 }
13351335 ty:: AssocKind :: Fn => {
13361336 let hir:: TraitItemKind :: Fn ( m_sig, m) = & ast_item. kind else { bug ! ( ) } ;
@@ -1345,13 +1345,12 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
13451345 self . tables . asyncness . set ( def_id. index , m_sig. header . asyncness ) ;
13461346 self . tables . constness . set ( def_id. index , hir:: Constness :: NotConst ) ;
13471347 record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocFn {
1348- container: ty:: AssocItemContainer :: TraitContainer ,
13491348 has_self: trait_item. fn_has_self_parameter,
13501349 } ) ;
13511350 }
13521351 ty:: AssocKind :: Type => {
13531352 self . encode_explicit_item_bounds ( def_id) ;
1354- record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocType ( ty :: AssocItemContainer :: TraitContainer ) ) ;
1353+ record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocType ) ;
13551354 }
13561355 }
13571356 if trait_item. kind == ty:: AssocKind :: Fn {
@@ -1366,11 +1365,11 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
13661365 let ast_item = self . tcx . hir ( ) . expect_impl_item ( def_id. expect_local ( ) ) ;
13671366 self . tables . impl_defaultness . set ( def_id. index , ast_item. defaultness ) ;
13681367 let impl_item = self . tcx . associated_item ( def_id) ;
1368+ self . tables . assoc_container . set ( def_id. index , impl_item. container ) ;
13691369
13701370 match impl_item. kind {
13711371 ty:: AssocKind :: Const => {
1372- let container = impl_item. container ;
1373- record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocConst ( container) ) ;
1372+ record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocConst ) ;
13741373 }
13751374 ty:: AssocKind :: Fn => {
13761375 let hir:: ImplItemKind :: Fn ( ref sig, body) = ast_item. kind else { bug ! ( ) } ;
@@ -1384,12 +1383,11 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
13841383 } ;
13851384 self . tables . constness . set ( def_id. index , constness) ;
13861385 record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocFn {
1387- container: ty:: AssocItemContainer :: ImplContainer ,
13881386 has_self: impl_item. fn_has_self_parameter,
13891387 } ) ;
13901388 }
13911389 ty:: AssocKind :: Type => {
1392- record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocType ( ty :: AssocItemContainer :: ImplContainer ) ) ;
1390+ record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocType ) ;
13931391 }
13941392 }
13951393 if let Some ( trait_item_def_id) = impl_item. trait_item_def_id {
0 commit comments