@@ -22,7 +22,7 @@ use rustc_back::PanicStrategy;
22
22
use rustc:: session:: search_paths:: PathKind ;
23
23
use rustc:: middle;
24
24
use rustc:: middle:: cstore:: { CrateStore , validate_crate_name, ExternCrate } ;
25
- use rustc:: util:: nodemap:: { FxHashMap , FxHashSet } ;
25
+ use rustc:: util:: nodemap:: FxHashSet ;
26
26
use rustc:: middle:: cstore:: NativeLibrary ;
27
27
use rustc:: hir:: map:: Definitions ;
28
28
@@ -52,7 +52,6 @@ pub struct CrateLoader<'a> {
52
52
pub sess : & ' a Session ,
53
53
cstore : & ' a CStore ,
54
54
next_crate_num : CrateNum ,
55
- foreign_item_map : FxHashMap < String , Vec < DefIndex > > ,
56
55
local_crate_name : Symbol ,
57
56
}
58
57
@@ -148,7 +147,6 @@ impl<'a> CrateLoader<'a> {
148
147
sess : sess,
149
148
cstore : cstore,
150
149
next_crate_num : cstore. next_crate_num ( ) ,
151
- foreign_item_map : FxHashMap ( ) ,
152
150
local_crate_name : Symbol :: intern ( local_crate_name) ,
153
151
}
154
152
}
@@ -649,14 +647,6 @@ impl<'a> CrateLoader<'a> {
649
647
items. extend ( & lib. foreign_items ) ;
650
648
}
651
649
}
652
- for ( foreign_lib, list) in self . foreign_item_map . iter ( ) {
653
- let kind_matches = libs. borrow ( ) . iter ( ) . any ( |lib| {
654
- lib. name == & * * foreign_lib && lib. kind == kind
655
- } ) ;
656
- if kind_matches {
657
- items. extend ( list)
658
- }
659
- }
660
650
items
661
651
}
662
652
@@ -943,17 +933,6 @@ impl<'a> CrateLoader<'a> {
943
933
} ;
944
934
register_native_lib ( self . sess , self . cstore , Some ( m. span ) , lib) ;
945
935
}
946
-
947
- // Finally, process the #[linked_from = "..."] attribute
948
- for m in i. attrs . iter ( ) . filter ( |a| a. check_name ( "linked_from" ) ) {
949
- let lib_name = match m. value_str ( ) {
950
- Some ( name) => name,
951
- None => continue ,
952
- } ;
953
- let list = self . foreign_item_map . entry ( lib_name. to_string ( ) )
954
- . or_insert ( Vec :: new ( ) ) ;
955
- list. extend ( fm. items . iter ( ) . map ( |it| definitions. opt_def_index ( it. id ) . unwrap ( ) ) ) ;
956
- }
957
936
}
958
937
}
959
938
0 commit comments