@@ -2259,8 +2259,8 @@ pub fn trans_item(ccx: &CrateContext, item: &hir::Item) {
22592259 // compilation unit that references the item, so it will still get
22602260 // translated everywhere it's needed.
22612261 for ( ref ccx, is_origin) in ccx. maybe_iter ( !from_external && trans_everywhere) {
2262- let empty_substs = ccx. empty_substs_for_node_id ( item. id ) ;
22632262 let def_id = tcx. map . local_def_id ( item. id ) ;
2263+ let empty_substs = ccx. empty_substs_for_def_id ( def_id) ;
22642264 let llfn = Callee :: def ( ccx, def_id, empty_substs) . reify ( ccx) . val ;
22652265 trans_fn ( ccx, & decl, & body, llfn, empty_substs, item. id ) ;
22662266 set_global_section ( ccx, llfn, item) ;
@@ -2298,8 +2298,8 @@ pub fn trans_item(ccx: &CrateContext, item: &hir::Item) {
22982298 if sig. generics . ty_params . is_empty ( ) {
22992299 let trans_everywhere = attr:: requests_inline ( & impl_item. attrs ) ;
23002300 for ( ref ccx, is_origin) in ccx. maybe_iter ( trans_everywhere) {
2301- let empty_substs = ccx. empty_substs_for_node_id ( impl_item. id ) ;
23022301 let def_id = tcx. map . local_def_id ( impl_item. id ) ;
2302+ let empty_substs = ccx. empty_substs_for_def_id ( def_id) ;
23032303 let llfn = Callee :: def ( ccx, def_id, empty_substs) . reify ( ccx) . val ;
23042304 trans_fn ( ccx, & sig. decl , body, llfn, empty_substs, impl_item. id ) ;
23052305 update_linkage ( ccx, llfn, Some ( impl_item. id ) ,
0 commit comments