@@ -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 ;
@@ -1329,24 +1329,25 @@ impl<'tcx> TyCtxtFeed<'tcx, LocalDefId> {
1329
1329
1330
1330
// Fills in all the important parts needed by HIR queries
1331
1331
pub fn feed_hir ( & self ) {
1332
- self . local_def_id_to_hir_id ( HirId :: make_owner ( self . def_id ( ) ) ) ;
1333
-
1334
1332
let node = hir:: OwnerNode :: Synthetic ;
1335
1333
let bodies = Default :: default ( ) ;
1336
- let attrs = hir:: AttributeMap :: EMPTY ;
1337
-
1334
+ let attrs = hir:: AttributeMap :: empty ( ) ;
1338
1335
let ( opt_hash_including_bodies, _) =
1339
1336
self . tcx . hash_owner_nodes ( node, & bodies, & attrs. map , attrs. define_opaque ) ;
1340
1337
let node = node. into ( ) ;
1341
- self . opt_hir_owner_nodes ( Some ( self . tcx . arena . alloc ( hir:: OwnerNodes {
1342
- opt_hash_including_bodies,
1343
- nodes : IndexVec :: from_elem_n (
1344
- hir:: ParentedNode { parent : hir:: ItemLocalId :: INVALID , node } ,
1345
- 1 ,
1346
- ) ,
1347
- bodies,
1338
+ self . hir_owner ( MaybeOwner :: Owner ( self . tcx . arena . alloc ( OwnerInfo {
1339
+ nodes : hir:: OwnerNodes {
1340
+ opt_hash_including_bodies,
1341
+ nodes : IndexVec :: from_elem_n (
1342
+ hir:: ParentedNode { parent : hir:: ItemLocalId :: INVALID , node } ,
1343
+ 1 ,
1344
+ ) ,
1345
+ bodies,
1346
+ } ,
1347
+ parenting : Default :: default ( ) ,
1348
+ attrs,
1349
+ trait_map : Default :: default ( ) ,
1348
1350
} ) ) ) ;
1349
- self . feed_owner_id ( ) . hir_attr_map ( attrs) ;
1350
1351
}
1351
1352
}
1352
1353
0 commit comments