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> {
11331133 trait_map,
11341134 export_map : resolutions. export_map ,
11351135 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 ,
11411137 glob_map : resolutions
11421138 . glob_map
11431139 . into_iter ( )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ use crate::ty;
1717use crate :: ty:: subst:: { InternalSubsts , Subst , SubstsRef } ;
1818use crate :: ty:: util:: { Discr , IntTypeExt } ;
1919use rustc_ast:: ast;
20- use rustc_ast:: node_id:: { NodeId , NodeMap } ;
20+ use rustc_ast:: node_id:: NodeMap ;
2121use rustc_attr as attr;
2222use rustc_data_structures:: captures:: Captures ;
2323use rustc_data_structures:: fingerprint:: Fingerprint ;
@@ -124,7 +124,7 @@ pub struct ResolverOutputs {
124124 pub extern_crate_map : NodeMap < CrateNum > ,
125125 pub trait_map : FxHashMap < hir:: HirId , Vec < hir:: TraitCandidate < hir:: HirId > > > ,
126126 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 ) > ,
128128 pub export_map : ExportMap < hir:: HirId > ,
129129 pub glob_map : GlobMap ,
130130 /// 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> {
13031303 . into_iter ( )
13041304 . map ( |id| definitions. local_def_id ( id) )
13051305 . 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 ( ) ;
13061311 ResolverOutputs {
13071312 definitions : definitions,
13081313 cstore : Box :: new ( self . crate_loader . into_cstore ( ) ) ,
@@ -1311,7 +1316,7 @@ impl<'a> Resolver<'a> {
13111316 trait_map,
13121317 glob_map : self . glob_map ,
13131318 maybe_unused_trait_imports,
1314- maybe_unused_extern_crates : self . maybe_unused_extern_crates ,
1319+ maybe_unused_extern_crates,
13151320 extern_prelude : self
13161321 . extern_prelude
13171322 . iter ( )
@@ -1358,7 +1363,11 @@ impl<'a> Resolver<'a> {
13581363 . iter ( )
13591364 . map ( |id| self . definitions . local_def_id ( id. clone ( ) ) )
13601365 . 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 ( ) ,
13621371 extern_prelude : self
13631372 . extern_prelude
13641373 . iter ( )
You can’t perform that action at this time.
0 commit comments