@@ -34,7 +34,7 @@ use rustc::ty::util::IntTypeExt;
34
34
use rustc:: hir:: svh:: Svh ;
35
35
use rustc:: mir:: mir_map:: MirMap ;
36
36
use rustc:: session:: config:: { self , PanicStrategy } ;
37
- use rustc:: util:: nodemap:: { FnvHashMap , NodeMap , NodeSet } ;
37
+ use rustc:: util:: nodemap:: { FnvHashMap , NodeSet } ;
38
38
39
39
use rustc_serialize:: Encodable ;
40
40
use std:: cell:: RefCell ;
@@ -59,7 +59,6 @@ pub struct EncodeContext<'a, 'tcx: 'a> {
59
59
pub diag : & ' a Handler ,
60
60
pub tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
61
61
pub reexports : & ' a def:: ExportMap ,
62
- pub item_symbols : & ' a RefCell < NodeMap < String > > ,
63
62
pub link_meta : & ' a LinkMeta ,
64
63
pub cstore : & ' a cstore:: CStore ,
65
64
pub type_abbrevs : tyencode:: abbrev_map < ' tcx > ,
@@ -213,20 +212,6 @@ fn encode_region(ecx: &EncodeContext,
213
212
rbml_w. end_tag ( ) ;
214
213
}
215
214
216
- fn encode_symbol ( ecx : & EncodeContext ,
217
- rbml_w : & mut Encoder ,
218
- id : NodeId ) {
219
- match ecx. item_symbols . borrow ( ) . get ( & id) {
220
- Some ( x) => {
221
- debug ! ( "encode_symbol(id={}, str={})" , id, * x) ;
222
- rbml_w. wr_tagged_str ( tag_items_data_item_symbol, x) ;
223
- }
224
- None => {
225
- bug ! ( "encode_symbol: id not found {}" , id) ;
226
- }
227
- }
228
- }
229
-
230
215
fn encode_disr_val ( _: & EncodeContext ,
231
216
rbml_w : & mut Encoder ,
232
217
disr_val : ty:: Disr ) {
@@ -518,10 +503,6 @@ fn encode_info_for_struct_ctor<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
518
503
encode_name ( rbml_w, name) ;
519
504
encode_parent_item ( rbml_w, ecx. tcx . map . local_def_id ( struct_id) ) ;
520
505
521
- if ecx. item_symbols . borrow ( ) . contains_key ( & ctor_id) {
522
- encode_symbol ( ecx, rbml_w, ctor_id) ;
523
- }
524
-
525
506
let stab = ecx. tcx . lookup_stability ( ecx. tcx . map . local_def_id ( ctor_id) ) ;
526
507
let depr= ecx. tcx . lookup_deprecation ( ecx. tcx . map . local_def_id ( ctor_id) ) ;
527
508
encode_stability ( rbml_w, stab) ;
@@ -710,10 +691,6 @@ fn encode_info_for_method<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
710
691
}
711
692
encode_constness ( rbml_w, sig. constness ) ;
712
693
encode_defaultness ( rbml_w, impl_item. defaultness ) ;
713
- if !any_types {
714
- let m_id = ecx. local_id ( m. def_id ) ;
715
- encode_symbol ( ecx, rbml_w, m_id) ;
716
- }
717
694
encode_method_argument_names ( rbml_w, & sig. decl ) ;
718
695
}
719
696
}
@@ -894,7 +871,6 @@ fn encode_info_for_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
894
871
encode_family ( rbml_w, 'c' ) ;
895
872
}
896
873
encode_bounds_and_type_for_item ( rbml_w, ecx, index, item. id ) ;
897
- encode_symbol ( ecx, rbml_w, item. id ) ;
898
874
encode_name ( rbml_w, item. name ) ;
899
875
encode_visibility ( rbml_w, vis) ;
900
876
encode_stability ( rbml_w, stab) ;
@@ -931,9 +907,6 @@ fn encode_info_for_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
931
907
encode_inlined_item ( ecx, rbml_w, InlinedItemRef :: Item ( item) ) ;
932
908
encode_mir ( ecx, rbml_w, item. id ) ;
933
909
}
934
- if tps_len == 0 {
935
- encode_symbol ( ecx, rbml_w, item. id ) ;
936
- }
937
910
encode_constness ( rbml_w, constness) ;
938
911
encode_visibility ( rbml_w, vis) ;
939
912
encode_stability ( rbml_w, stab) ;
@@ -1365,8 +1338,6 @@ fn encode_info_for_foreign_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
1365
1338
if abi == Abi :: RustIntrinsic || abi == Abi :: PlatformIntrinsic {
1366
1339
encode_inlined_item ( ecx, rbml_w, InlinedItemRef :: Foreign ( nitem) ) ;
1367
1340
encode_mir ( ecx, rbml_w, nitem. id ) ;
1368
- } else {
1369
- encode_symbol ( ecx, rbml_w, nitem. id ) ;
1370
1341
}
1371
1342
encode_attributes ( rbml_w, & nitem. attrs ) ;
1372
1343
let stab = ecx. tcx . lookup_stability ( ecx. tcx . map . local_def_id ( nitem. id ) ) ;
@@ -1387,7 +1358,6 @@ fn encode_info_for_foreign_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
1387
1358
let depr = ecx. tcx . lookup_deprecation ( ecx. tcx . map . local_def_id ( nitem. id ) ) ;
1388
1359
encode_stability ( rbml_w, stab) ;
1389
1360
encode_deprecation ( rbml_w, depr) ;
1390
- encode_symbol ( ecx, rbml_w, nitem. id ) ;
1391
1361
encode_name ( rbml_w, nitem. name ) ;
1392
1362
}
1393
1363
}
0 commit comments