@@ -34,7 +34,7 @@ use rustc::ty::util::IntTypeExt;
3434use rustc:: hir:: svh:: Svh ;
3535use rustc:: mir:: mir_map:: MirMap ;
3636use rustc:: session:: config:: { self , PanicStrategy } ;
37- use rustc:: util:: nodemap:: { FnvHashMap , NodeMap , NodeSet } ;
37+ use rustc:: util:: nodemap:: { FnvHashMap , NodeSet } ;
3838
3939use rustc_serialize:: Encodable ;
4040use std:: cell:: RefCell ;
@@ -59,7 +59,6 @@ pub struct EncodeContext<'a, 'tcx: 'a> {
5959 pub diag : & ' a Handler ,
6060 pub tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
6161 pub reexports : & ' a def:: ExportMap ,
62- pub item_symbols : & ' a RefCell < NodeMap < String > > ,
6362 pub link_meta : & ' a LinkMeta ,
6463 pub cstore : & ' a cstore:: CStore ,
6564 pub type_abbrevs : tyencode:: abbrev_map < ' tcx > ,
@@ -213,20 +212,6 @@ fn encode_region(ecx: &EncodeContext,
213212 rbml_w. end_tag ( ) ;
214213}
215214
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-
230215fn encode_disr_val ( _: & EncodeContext ,
231216 rbml_w : & mut Encoder ,
232217 disr_val : ty:: Disr ) {
@@ -518,10 +503,6 @@ fn encode_info_for_struct_ctor<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
518503 encode_name ( rbml_w, name) ;
519504 encode_parent_item ( rbml_w, ecx. tcx . map . local_def_id ( struct_id) ) ;
520505
521- if ecx. item_symbols . borrow ( ) . contains_key ( & ctor_id) {
522- encode_symbol ( ecx, rbml_w, ctor_id) ;
523- }
524-
525506 let stab = ecx. tcx . lookup_stability ( ecx. tcx . map . local_def_id ( ctor_id) ) ;
526507 let depr= ecx. tcx . lookup_deprecation ( ecx. tcx . map . local_def_id ( ctor_id) ) ;
527508 encode_stability ( rbml_w, stab) ;
@@ -710,10 +691,6 @@ fn encode_info_for_method<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
710691 }
711692 encode_constness ( rbml_w, sig. constness ) ;
712693 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- }
717694 encode_method_argument_names ( rbml_w, & sig. decl ) ;
718695 }
719696 }
@@ -894,7 +871,6 @@ fn encode_info_for_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
894871 encode_family ( rbml_w, 'c' ) ;
895872 }
896873 encode_bounds_and_type_for_item ( rbml_w, ecx, index, item. id ) ;
897- encode_symbol ( ecx, rbml_w, item. id ) ;
898874 encode_name ( rbml_w, item. name ) ;
899875 encode_visibility ( rbml_w, vis) ;
900876 encode_stability ( rbml_w, stab) ;
@@ -931,9 +907,6 @@ fn encode_info_for_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
931907 encode_inlined_item ( ecx, rbml_w, InlinedItemRef :: Item ( item) ) ;
932908 encode_mir ( ecx, rbml_w, item. id ) ;
933909 }
934- if tps_len == 0 {
935- encode_symbol ( ecx, rbml_w, item. id ) ;
936- }
937910 encode_constness ( rbml_w, constness) ;
938911 encode_visibility ( rbml_w, vis) ;
939912 encode_stability ( rbml_w, stab) ;
@@ -1365,8 +1338,6 @@ fn encode_info_for_foreign_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
13651338 if abi == Abi :: RustIntrinsic || abi == Abi :: PlatformIntrinsic {
13661339 encode_inlined_item ( ecx, rbml_w, InlinedItemRef :: Foreign ( nitem) ) ;
13671340 encode_mir ( ecx, rbml_w, nitem. id ) ;
1368- } else {
1369- encode_symbol ( ecx, rbml_w, nitem. id ) ;
13701341 }
13711342 encode_attributes ( rbml_w, & nitem. attrs ) ;
13721343 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>,
13871358 let depr = ecx. tcx . lookup_deprecation ( ecx. tcx . map . local_def_id ( nitem. id ) ) ;
13881359 encode_stability ( rbml_w, stab) ;
13891360 encode_deprecation ( rbml_w, depr) ;
1390- encode_symbol ( ecx, rbml_w, nitem. id ) ;
13911361 encode_name ( rbml_w, nitem. name ) ;
13921362 }
13931363 }
0 commit comments