@@ -1326,11 +1326,11 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1326
1326
let ast_item = tcx. hir ( ) . expect_trait_item ( def_id. expect_local ( ) ) ;
1327
1327
self . tables . impl_defaultness . set ( def_id. index , ast_item. defaultness ) ;
1328
1328
let trait_item = tcx. associated_item ( def_id) ;
1329
+ self . tables . assoc_container . set ( def_id. index , trait_item. container ) ;
1329
1330
1330
1331
match trait_item. kind {
1331
1332
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 ) ;
1334
1334
}
1335
1335
ty:: AssocKind :: Fn => {
1336
1336
let hir:: TraitItemKind :: Fn ( m_sig, m) = & ast_item. kind else { bug ! ( ) } ;
@@ -1345,13 +1345,12 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1345
1345
self . tables . asyncness . set ( def_id. index , m_sig. header . asyncness ) ;
1346
1346
self . tables . constness . set ( def_id. index , hir:: Constness :: NotConst ) ;
1347
1347
record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocFn {
1348
- container: ty:: AssocItemContainer :: TraitContainer ,
1349
1348
has_self: trait_item. fn_has_self_parameter,
1350
1349
} ) ;
1351
1350
}
1352
1351
ty:: AssocKind :: Type => {
1353
1352
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 ) ;
1355
1354
}
1356
1355
}
1357
1356
if trait_item. kind == ty:: AssocKind :: Fn {
@@ -1366,11 +1365,11 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1366
1365
let ast_item = self . tcx . hir ( ) . expect_impl_item ( def_id. expect_local ( ) ) ;
1367
1366
self . tables . impl_defaultness . set ( def_id. index , ast_item. defaultness ) ;
1368
1367
let impl_item = self . tcx . associated_item ( def_id) ;
1368
+ self . tables . assoc_container . set ( def_id. index , impl_item. container ) ;
1369
1369
1370
1370
match impl_item. kind {
1371
1371
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 ) ;
1374
1373
}
1375
1374
ty:: AssocKind :: Fn => {
1376
1375
let hir:: ImplItemKind :: Fn ( ref sig, body) = ast_item. kind else { bug ! ( ) } ;
@@ -1384,12 +1383,11 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1384
1383
} ;
1385
1384
self . tables . constness . set ( def_id. index , constness) ;
1386
1385
record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocFn {
1387
- container: ty:: AssocItemContainer :: ImplContainer ,
1388
1386
has_self: impl_item. fn_has_self_parameter,
1389
1387
} ) ;
1390
1388
}
1391
1389
ty:: AssocKind :: Type => {
1392
- record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocType ( ty :: AssocItemContainer :: ImplContainer ) ) ;
1390
+ record ! ( self . tables. kind[ def_id] <- EntryKind :: AssocType ) ;
1393
1391
}
1394
1392
}
1395
1393
if let Some ( trait_item_def_id) = impl_item. trait_item_def_id {
0 commit comments