File tree 2 files changed +6
-5
lines changed
compiler/rustc_middle/src
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1277,10 +1277,6 @@ rustc_queries! {
1277
1277
query item_children( def_id: DefId ) -> & ' tcx [ Export <hir:: HirId >] {
1278
1278
desc { |tcx| "collecting child items of `{}`" , tcx. def_path_str( def_id) }
1279
1279
}
1280
- query extern_mod_stmt_cnum( def_id: LocalDefId ) -> Option <CrateNum > {
1281
- desc { |tcx| "computing crate imported by `{}`" , tcx. def_path_str( def_id. to_def_id( ) ) }
1282
- }
1283
-
1284
1280
query get_lib_features( _: CrateNum ) -> LibFeatures {
1285
1281
storage( ArenaCacheSelector <' tcx>)
1286
1282
eval_always
Original file line number Diff line number Diff line change @@ -1550,6 +1550,12 @@ impl<'tcx> TyCtxt<'tcx> {
1550
1550
def_kind => ( def_kind. article ( ) , def_kind. descr ( def_id) ) ,
1551
1551
}
1552
1552
}
1553
+
1554
+ /// Returns the `CrateNum` of the crate that the given `extern crate` statement
1555
+ /// resolves to.
1556
+ pub fn extern_mod_stmt_cnum ( self , id : LocalDefId ) -> Option < CrateNum > {
1557
+ self . extern_crate_map . get ( & id) . cloned ( )
1558
+ }
1553
1559
}
1554
1560
1555
1561
/// A trait implemented for all `X<'a>` types that can be safely and
@@ -2755,7 +2761,6 @@ pub fn provide(providers: &mut ty::query::Providers) {
2755
2761
let id = tcx. hir ( ) . local_def_id_to_hir_id ( id. expect_local ( ) ) ;
2756
2762
tcx. stability ( ) . local_deprecation_entry ( id)
2757
2763
} ;
2758
- providers. extern_mod_stmt_cnum = |tcx, id| tcx. extern_crate_map . get ( & id) . cloned ( ) ;
2759
2764
providers. all_crate_nums = |tcx, cnum| {
2760
2765
assert_eq ! ( cnum, LOCAL_CRATE ) ;
2761
2766
tcx. arena . alloc_slice ( & tcx. cstore . crates_untracked ( ) )
You can’t perform that action at this time.
0 commit comments