@@ -8,7 +8,7 @@ use rustc_ast::expand::allocator::AllocatorKind;
88use rustc_ast:: { self as ast, * } ;
99use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
1010use rustc_data_structures:: svh:: Svh ;
11- use rustc_data_structures:: sync:: { MappedReadGuard , ReadGuard } ;
11+ use rustc_data_structures:: sync:: MappedReadGuard ;
1212use rustc_expand:: base:: SyntaxExtension ;
1313use rustc_hir:: def_id:: { CrateNum , LocalDefId , StableCrateId , LOCAL_CRATE } ;
1414use rustc_hir:: definitions:: Definitions ;
@@ -64,7 +64,6 @@ pub struct CrateLoader<'a> {
6464 // Immutable configuration.
6565 sess : & ' a Session ,
6666 metadata_loader : & ' a MetadataLoaderDyn ,
67- definitions : ReadGuard < ' a , Definitions > ,
6867 local_crate_name : Symbol ,
6968 // Mutable output.
7069 cstore : & ' a mut CStore ,
@@ -261,17 +260,9 @@ impl<'a> CrateLoader<'a> {
261260 metadata_loader : & ' a MetadataLoaderDyn ,
262261 local_crate_name : Symbol ,
263262 cstore : & ' a mut CStore ,
264- definitions : ReadGuard < ' a , Definitions > ,
265263 used_extern_options : & ' a mut FxHashSet < Symbol > ,
266264 ) -> Self {
267- CrateLoader {
268- sess,
269- metadata_loader,
270- local_crate_name,
271- cstore,
272- used_extern_options,
273- definitions,
274- }
265+ CrateLoader { sess, metadata_loader, local_crate_name, cstore, used_extern_options }
275266 }
276267 pub fn cstore ( & self ) -> & CStore {
277268 & self . cstore
@@ -989,6 +980,7 @@ impl<'a> CrateLoader<'a> {
989980 & mut self ,
990981 item : & ast:: Item ,
991982 def_id : LocalDefId ,
983+ definitions : & Definitions ,
992984 ) -> Option < CrateNum > {
993985 match item. kind {
994986 ast:: ItemKind :: ExternCrate ( orig_name) => {
@@ -1011,7 +1003,7 @@ impl<'a> CrateLoader<'a> {
10111003
10121004 let cnum = self . resolve_crate ( name, item. span , dep_kind) ?;
10131005
1014- let path_len = self . definitions . def_path ( def_id) . data . len ( ) ;
1006+ let path_len = definitions. def_path ( def_id) . data . len ( ) ;
10151007 self . update_extern_crate (
10161008 cnum,
10171009 ExternCrate {
0 commit comments