@@ -945,11 +945,11 @@ pub struct GlobalCtxt<'tcx> {
945945
946946 pub queries : query:: Queries < ' tcx > ,
947947
948- maybe_unused_trait_imports : FxHashSet < DefId > ,
948+ maybe_unused_trait_imports : FxHashSet < LocalDefId > ,
949949 maybe_unused_extern_crates : Vec < ( DefId , Span ) > ,
950950 /// A map of glob use to a set of names it actually imports. Currently only
951951 /// used in save-analysis.
952- glob_map : FxHashMap < DefId , FxHashSet < ast:: Name > > ,
952+ glob_map : FxHashMap < LocalDefId , FxHashSet < ast:: Name > > ,
953953 /// Extern prelude entries. The value is `true` if the entry was introduced
954954 /// via `extern crate` item and not `--extern` option or compiler built-in.
955955 pub extern_prelude : FxHashMap < ast:: Name , bool > ,
@@ -1165,7 +1165,7 @@ impl<'tcx> TyCtxt<'tcx> {
11651165 maybe_unused_trait_imports : resolutions
11661166 . maybe_unused_trait_imports
11671167 . into_iter ( )
1168- . map ( |id| definitions. local_def_id ( id) . to_def_id ( ) )
1168+ . map ( |id| definitions. local_def_id ( id) )
11691169 . collect ( ) ,
11701170 maybe_unused_extern_crates : resolutions
11711171 . maybe_unused_extern_crates
@@ -1175,7 +1175,7 @@ impl<'tcx> TyCtxt<'tcx> {
11751175 glob_map : resolutions
11761176 . glob_map
11771177 . into_iter ( )
1178- . map ( |( id, names) | ( definitions. local_def_id ( id) . to_def_id ( ) , names) )
1178+ . map ( |( id, names) | ( definitions. local_def_id ( id) , names) )
11791179 . collect ( ) ,
11801180 extern_prelude : resolutions. extern_prelude ,
11811181 untracked_crate : krate,
@@ -2724,10 +2724,8 @@ pub fn provide(providers: &mut ty::query::Providers<'_>) {
27242724 assert_eq ! ( cnum, LOCAL_CRATE ) ;
27252725 & tcx. maybe_unused_extern_crates [ ..]
27262726 } ;
2727- providers. names_imported_by_glob_use = |tcx, id| {
2728- assert_eq ! ( id. krate, LOCAL_CRATE ) ;
2729- tcx. arena . alloc ( tcx. glob_map . get ( & id) . cloned ( ) . unwrap_or_default ( ) )
2730- } ;
2727+ providers. names_imported_by_glob_use =
2728+ |tcx, id| tcx. arena . alloc ( tcx. glob_map . get ( & id) . cloned ( ) . unwrap_or_default ( ) ) ;
27312729
27322730 providers. lookup_stability = |tcx, id| {
27332731 let id = tcx. hir ( ) . local_def_id_to_hir_id ( id. expect_local ( ) ) ;
0 commit comments