@@ -35,7 +35,7 @@ use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE, LocalDefId};
35
35
use rustc_hir:: definitions:: Definitions ;
36
36
use rustc_hir:: intravisit:: VisitorExt ;
37
37
use rustc_hir:: lang_items:: LangItem ;
38
- use rustc_hir:: { self as hir, Attribute , HirId , Node , TraitCandidate } ;
38
+ use rustc_hir:: { self as hir, Attribute , HirId , MaybeOwner , Node , OwnerInfo , TraitCandidate } ;
39
39
use rustc_index:: IndexVec ;
40
40
use rustc_macros:: { HashStable , TyDecodable , TyEncodable } ;
41
41
use rustc_query_system:: cache:: WithDepNode ;
@@ -1282,23 +1282,24 @@ impl<'tcx> TyCtxtFeed<'tcx, LocalDefId> {
1282
1282
1283
1283
// Fills in all the important parts needed by HIR queries
1284
1284
pub fn feed_hir ( & self ) {
1285
- self . local_def_id_to_hir_id ( HirId :: make_owner ( self . def_id ( ) ) ) ;
1286
-
1287
1285
let node = hir:: OwnerNode :: Synthetic ;
1288
1286
let bodies = Default :: default ( ) ;
1289
- let attrs = hir:: AttributeMap :: EMPTY ;
1290
-
1287
+ let attrs = hir:: AttributeMap :: empty ( ) ;
1291
1288
let ( opt_hash_including_bodies, _) = self . tcx . hash_owner_nodes ( node, & bodies, & attrs. map ) ;
1292
1289
let node = node. into ( ) ;
1293
- self . opt_hir_owner_nodes ( Some ( self . tcx . arena . alloc ( hir:: OwnerNodes {
1294
- opt_hash_including_bodies,
1295
- nodes : IndexVec :: from_elem_n (
1296
- hir:: ParentedNode { parent : hir:: ItemLocalId :: INVALID , node } ,
1297
- 1 ,
1298
- ) ,
1299
- bodies,
1290
+ self . hir_owner ( MaybeOwner :: Owner ( self . tcx . arena . alloc ( OwnerInfo {
1291
+ nodes : hir:: OwnerNodes {
1292
+ opt_hash_including_bodies,
1293
+ nodes : IndexVec :: from_elem_n (
1294
+ hir:: ParentedNode { parent : hir:: ItemLocalId :: INVALID , node } ,
1295
+ 1 ,
1296
+ ) ,
1297
+ bodies,
1298
+ } ,
1299
+ parenting : Default :: default ( ) ,
1300
+ attrs,
1301
+ trait_map : Default :: default ( ) ,
1300
1302
} ) ) ) ;
1301
- self . feed_owner_id ( ) . hir_attr_map ( attrs) ;
1302
1303
}
1303
1304
}
1304
1305
0 commit comments