@@ -29,7 +29,6 @@ use rustc_middle::ty::query::Providers;
29
29
use rustc_middle:: ty:: { self , Instance , Ty , TyCtxt } ;
30
30
use rustc_session:: cgu_reuse_tracker:: CguReuse ;
31
31
use rustc_session:: config:: { self , EntryFnType } ;
32
- use rustc_session:: utils:: NativeLibKind ;
33
32
use rustc_session:: Session ;
34
33
use rustc_target:: abi:: { Align , LayoutOf , VariantIdx } ;
35
34
@@ -817,32 +816,6 @@ pub fn provide_both(providers: &mut Providers) {
817
816
}
818
817
tcx. sess . opts . optimize
819
818
} ;
820
-
821
- providers. dllimport_foreign_items = |tcx, krate| {
822
- let module_map = tcx. foreign_modules ( krate) ;
823
-
824
- let dllimports = tcx
825
- . native_libraries ( krate)
826
- . iter ( )
827
- . filter ( |lib| {
828
- if !matches ! ( lib. kind, NativeLibKind :: Dylib | NativeLibKind :: Unspecified ) {
829
- return false ;
830
- }
831
- let cfg = match lib. cfg {
832
- Some ( ref cfg) => cfg,
833
- None => return true ,
834
- } ;
835
- attr:: cfg_matches ( cfg, & tcx. sess . parse_sess , None )
836
- } )
837
- . filter_map ( |lib| lib. foreign_module )
838
- . map ( |id| & module_map[ & id] )
839
- . flat_map ( |module| module. foreign_items . iter ( ) . cloned ( ) )
840
- . collect ( ) ;
841
- dllimports
842
- } ;
843
-
844
- providers. is_dllimport_foreign_item =
845
- |tcx, def_id| tcx. dllimport_foreign_items ( def_id. krate ) . contains ( & def_id) ;
846
819
}
847
820
848
821
fn determine_cgu_reuse < ' tcx > ( tcx : TyCtxt < ' tcx > , cgu : & CodegenUnit < ' tcx > ) -> CguReuse {
0 commit comments