@@ -33,7 +33,7 @@ use rustc::ty::util::IntTypeExt;
3333use rustc:: hir:: svh:: Svh ;
3434use rustc:: mir:: mir_map:: MirMap ;
3535use rustc:: session:: config:: { self , PanicStrategy } ;
36- use rustc:: util:: nodemap:: { FnvHashMap , NodeMap , NodeSet } ;
36+ use rustc:: util:: nodemap:: { FnvHashMap , NodeSet } ;
3737
3838use rustc_serialize:: Encodable ;
3939use std:: cell:: RefCell ;
@@ -58,7 +58,6 @@ pub struct EncodeContext<'a, 'tcx: 'a> {
5858 pub diag : & ' a Handler ,
5959 pub tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
6060 pub reexports : & ' a def:: ExportMap ,
61- pub item_symbols : & ' a RefCell < NodeMap < String > > ,
6261 pub link_meta : & ' a LinkMeta ,
6362 pub cstore : & ' a cstore:: CStore ,
6463 pub type_abbrevs : tyencode:: abbrev_map < ' tcx > ,
@@ -204,20 +203,6 @@ fn encode_region(ecx: &EncodeContext,
204203 rbml_w. end_tag ( ) ;
205204}
206205
207- fn encode_symbol ( ecx : & EncodeContext ,
208- rbml_w : & mut Encoder ,
209- id : NodeId ) {
210- match ecx. item_symbols . borrow ( ) . get ( & id) {
211- Some ( x) => {
212- debug ! ( "encode_symbol(id={}, str={})" , id, * x) ;
213- rbml_w. wr_tagged_str ( tag_items_data_item_symbol, x) ;
214- }
215- None => {
216- bug ! ( "encode_symbol: id not found {}" , id) ;
217- }
218- }
219- }
220-
221206fn encode_disr_val ( _: & EncodeContext ,
222207 rbml_w : & mut Encoder ,
223208 disr_val : ty:: Disr ) {
@@ -512,10 +497,6 @@ fn encode_info_for_struct_ctor<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
512497 encode_name ( rbml_w, name) ;
513498 encode_parent_item ( rbml_w, ecx. tcx . map . local_def_id ( struct_id) ) ;
514499
515- if ecx. item_symbols . borrow ( ) . contains_key ( & ctor_id) {
516- encode_symbol ( ecx, rbml_w, ctor_id) ;
517- }
518-
519500 let stab = ecx. tcx . lookup_stability ( ecx. tcx . map . local_def_id ( ctor_id) ) ;
520501 let depr= ecx. tcx . lookup_deprecation ( ecx. tcx . map . local_def_id ( ctor_id) ) ;
521502 encode_stability ( rbml_w, stab) ;
@@ -704,10 +685,6 @@ fn encode_info_for_method<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
704685 }
705686 encode_constness ( rbml_w, sig. constness ) ;
706687 encode_defaultness ( rbml_w, impl_item. defaultness ) ;
707- if !any_types {
708- let m_id = ecx. local_id ( m. def_id ) ;
709- encode_symbol ( ecx, rbml_w, m_id) ;
710- }
711688 encode_method_argument_names ( rbml_w, & sig. decl ) ;
712689 }
713690 }
@@ -885,7 +862,6 @@ fn encode_info_for_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
885862 encode_family ( rbml_w, 'c' ) ;
886863 }
887864 encode_bounds_and_type_for_item ( rbml_w, ecx, index, item. id ) ;
888- encode_symbol ( ecx, rbml_w, item. id ) ;
889865 encode_name ( rbml_w, item. name ) ;
890866 encode_visibility ( rbml_w, vis) ;
891867 encode_stability ( rbml_w, stab) ;
@@ -922,9 +898,6 @@ fn encode_info_for_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
922898 encode_inlined_item ( ecx, rbml_w, InlinedItemRef :: Item ( item) ) ;
923899 encode_mir ( ecx, rbml_w, item. id ) ;
924900 }
925- if tps_len == 0 {
926- encode_symbol ( ecx, rbml_w, item. id ) ;
927- }
928901 encode_constness ( rbml_w, constness) ;
929902 encode_visibility ( rbml_w, vis) ;
930903 encode_stability ( rbml_w, stab) ;
@@ -1344,6 +1317,8 @@ fn encode_info_for_foreign_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
13441317 index. record ( def_id, rbml_w) ;
13451318 rbml_w. start_tag ( tag_items_data_item) ;
13461319 encode_def_id_and_key ( ecx, rbml_w, def_id) ;
1320+ let parent_id = ecx. tcx . map . get_parent ( nitem. id ) ;
1321+ encode_parent_item ( rbml_w, ecx. tcx . map . local_def_id ( parent_id) ) ;
13471322 encode_visibility ( rbml_w, & nitem. vis ) ;
13481323 match nitem. node {
13491324 hir:: ForeignItemFn ( ref fndecl, _) => {
@@ -1353,8 +1328,6 @@ fn encode_info_for_foreign_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
13531328 if abi == Abi :: RustIntrinsic || abi == Abi :: PlatformIntrinsic {
13541329 encode_inlined_item ( ecx, rbml_w, InlinedItemRef :: Foreign ( nitem) ) ;
13551330 encode_mir ( ecx, rbml_w, nitem. id ) ;
1356- } else {
1357- encode_symbol ( ecx, rbml_w, nitem. id ) ;
13581331 }
13591332 encode_attributes ( rbml_w, & nitem. attrs ) ;
13601333 let stab = ecx. tcx . lookup_stability ( ecx. tcx . map . local_def_id ( nitem. id ) ) ;
@@ -1375,7 +1348,6 @@ fn encode_info_for_foreign_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
13751348 let depr = ecx. tcx . lookup_deprecation ( ecx. tcx . map . local_def_id ( nitem. id ) ) ;
13761349 encode_stability ( rbml_w, stab) ;
13771350 encode_deprecation ( rbml_w, depr) ;
1378- encode_symbol ( ecx, rbml_w, nitem. id ) ;
13791351 encode_name ( rbml_w, nitem. name ) ;
13801352 }
13811353 }
0 commit comments