File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -1133,11 +1133,7 @@ impl<'tcx> TyCtxt<'tcx> {
1133
1133
trait_map,
1134
1134
export_map : resolutions. export_map ,
1135
1135
maybe_unused_trait_imports : resolutions. maybe_unused_trait_imports ,
1136
- maybe_unused_extern_crates : resolutions
1137
- . maybe_unused_extern_crates
1138
- . into_iter ( )
1139
- . map ( |( id, sp) | ( definitions. local_def_id ( id) . to_def_id ( ) , sp) )
1140
- . collect ( ) ,
1136
+ maybe_unused_extern_crates : resolutions. maybe_unused_extern_crates ,
1141
1137
glob_map : resolutions
1142
1138
. glob_map
1143
1139
. into_iter ( )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ use crate::ty;
17
17
use crate :: ty:: subst:: { InternalSubsts , Subst , SubstsRef } ;
18
18
use crate :: ty:: util:: { Discr , IntTypeExt } ;
19
19
use rustc_ast:: ast;
20
- use rustc_ast:: node_id:: { NodeId , NodeMap } ;
20
+ use rustc_ast:: node_id:: NodeMap ;
21
21
use rustc_attr as attr;
22
22
use rustc_data_structures:: captures:: Captures ;
23
23
use rustc_data_structures:: fingerprint:: Fingerprint ;
@@ -124,7 +124,7 @@ pub struct ResolverOutputs {
124
124
pub extern_crate_map : NodeMap < CrateNum > ,
125
125
pub trait_map : FxHashMap < hir:: HirId , Vec < hir:: TraitCandidate < hir:: HirId > > > ,
126
126
pub maybe_unused_trait_imports : FxHashSet < LocalDefId > ,
127
- pub maybe_unused_extern_crates : Vec < ( NodeId , Span ) > ,
127
+ pub maybe_unused_extern_crates : Vec < ( DefId , Span ) > ,
128
128
pub export_map : ExportMap < hir:: HirId > ,
129
129
pub glob_map : GlobMap ,
130
130
/// Extern prelude entries. The value is `true` if the entry was introduced
Original file line number Diff line number Diff line change @@ -1303,6 +1303,11 @@ impl<'a> Resolver<'a> {
1303
1303
. into_iter ( )
1304
1304
. map ( |id| definitions. local_def_id ( id) )
1305
1305
. collect ( ) ;
1306
+ let maybe_unused_extern_crates = self
1307
+ . maybe_unused_extern_crates
1308
+ . into_iter ( )
1309
+ . map ( |( id, sp) | ( definitions. local_def_id ( id) . to_def_id ( ) , sp) )
1310
+ . collect ( ) ;
1306
1311
ResolverOutputs {
1307
1312
definitions : definitions,
1308
1313
cstore : Box :: new ( self . crate_loader . into_cstore ( ) ) ,
@@ -1311,7 +1316,7 @@ impl<'a> Resolver<'a> {
1311
1316
trait_map,
1312
1317
glob_map : self . glob_map ,
1313
1318
maybe_unused_trait_imports,
1314
- maybe_unused_extern_crates : self . maybe_unused_extern_crates ,
1319
+ maybe_unused_extern_crates,
1315
1320
extern_prelude : self
1316
1321
. extern_prelude
1317
1322
. iter ( )
@@ -1358,7 +1363,11 @@ impl<'a> Resolver<'a> {
1358
1363
. iter ( )
1359
1364
. map ( |id| self . definitions . local_def_id ( id. clone ( ) ) )
1360
1365
. collect ( ) ,
1361
- maybe_unused_extern_crates : self . maybe_unused_extern_crates . clone ( ) ,
1366
+ maybe_unused_extern_crates : self
1367
+ . maybe_unused_extern_crates
1368
+ . iter ( )
1369
+ . map ( |( id, sp) | ( self . definitions . local_def_id ( id. clone ( ) ) . to_def_id ( ) , sp. clone ( ) ) )
1370
+ . collect ( ) ,
1362
1371
extern_prelude : self
1363
1372
. extern_prelude
1364
1373
. iter ( )
You can’t perform that action at this time.
0 commit comments