@@ -29,7 +29,6 @@ use rustc_middle::ty::query::Providers;
2929use rustc_middle:: ty:: { self , Instance , Ty , TyCtxt } ;
3030use rustc_session:: cgu_reuse_tracker:: CguReuse ;
3131use rustc_session:: config:: { self , EntryFnType } ;
32- use rustc_session:: utils:: NativeLibKind ;
3332use rustc_session:: Session ;
3433use rustc_target:: abi:: { Align , LayoutOf , VariantIdx } ;
3534
@@ -817,32 +816,6 @@ pub fn provide_both(providers: &mut Providers) {
817816 }
818817 tcx. sess . opts . optimize
819818 } ;
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) ;
846819}
847820
848821fn determine_cgu_reuse < ' tcx > ( tcx : TyCtxt < ' tcx > , cgu : & CodegenUnit < ' tcx > ) -> CguReuse {
0 commit comments