@@ -37,7 +37,7 @@ use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE, LocalDefId};
37
37
use rustc_hir:: definitions:: { DefPathData , Definitions , DisambiguatorState } ;
38
38
use rustc_hir:: intravisit:: VisitorExt ;
39
39
use rustc_hir:: lang_items:: LangItem ;
40
- use rustc_hir:: { self as hir, Attribute , HirId , Node , TraitCandidate } ;
40
+ use rustc_hir:: { self as hir, Attribute , HirId , MaybeOwner , Node , OwnerInfo , TraitCandidate } ;
41
41
use rustc_index:: IndexVec ;
42
42
use rustc_macros:: { HashStable , TyDecodable , TyEncodable } ;
43
43
use rustc_query_system:: cache:: WithDepNode ;
@@ -1326,24 +1326,25 @@ impl<'tcx> TyCtxtFeed<'tcx, LocalDefId> {
1326
1326
1327
1327
// Fills in all the important parts needed by HIR queries
1328
1328
pub fn feed_hir ( & self ) {
1329
- self . local_def_id_to_hir_id ( HirId :: make_owner ( self . def_id ( ) ) ) ;
1330
-
1331
1329
let node = hir:: OwnerNode :: Synthetic ;
1332
1330
let bodies = Default :: default ( ) ;
1333
- let attrs = hir:: AttributeMap :: EMPTY ;
1334
-
1331
+ let attrs = hir:: AttributeMap :: empty ( ) ;
1335
1332
let ( opt_hash_including_bodies, _) =
1336
1333
self . tcx . hash_owner_nodes ( node, & bodies, & attrs. map , attrs. define_opaque ) ;
1337
1334
let node = node. into ( ) ;
1338
- self . opt_hir_owner_nodes ( Some ( self . tcx . arena . alloc ( hir:: OwnerNodes {
1339
- opt_hash_including_bodies,
1340
- nodes : IndexVec :: from_elem_n (
1341
- hir:: ParentedNode { parent : hir:: ItemLocalId :: INVALID , node } ,
1342
- 1 ,
1343
- ) ,
1344
- bodies,
1335
+ self . hir_owner ( MaybeOwner :: Owner ( self . tcx . arena . alloc ( OwnerInfo {
1336
+ nodes : hir:: OwnerNodes {
1337
+ opt_hash_including_bodies,
1338
+ nodes : IndexVec :: from_elem_n (
1339
+ hir:: ParentedNode { parent : hir:: ItemLocalId :: INVALID , node } ,
1340
+ 1 ,
1341
+ ) ,
1342
+ bodies,
1343
+ } ,
1344
+ parenting : Default :: default ( ) ,
1345
+ attrs,
1346
+ trait_map : Default :: default ( ) ,
1345
1347
} ) ) ) ;
1346
- self . feed_owner_id ( ) . hir_attr_map ( attrs) ;
1347
1348
}
1348
1349
}
1349
1350
0 commit comments