@@ -48,7 +48,7 @@ type encode_parms = {
48
48
diag : span_handler ,
49
49
tcx : ty:: ctxt ,
50
50
reachable : hashmap < ast:: node_id , ( ) > ,
51
- exp_map : resolve :: exp_map ,
51
+ reexports : [ ( str , def_id ) ] ,
52
52
impl_map : resolve:: impl_map ,
53
53
item_symbols : hashmap < ast:: node_id , str > ,
54
54
discrim_symbols : hashmap < ast:: node_id , str > ,
@@ -61,7 +61,7 @@ enum encode_ctxt = {
61
61
diag: span_handler,
62
62
tcx: ty:: ctxt,
63
63
reachable: hashmap<ast:: node_id, ( ) >,
64
- exp_map : resolve :: exp_map ,
64
+ reexports : [ ( str , def_id ) ] ,
65
65
impl_map: resolve:: impl_map,
66
66
item_symbols: hashmap<ast:: node_id, str>,
67
67
discrim_symbols: hashmap<ast:: node_id, str>,
@@ -260,19 +260,13 @@ fn encode_item_paths(ebml_w: ebml::writer, ecx: @encode_ctxt, crate: @crate)
260
260
261
261
fn encode_reexport_paths( ebml_w: ebml:: writer,
262
262
ecx: @encode_ctxt, & index: [ entry < str > ] ) {
263
- let tcx = ecx. tcx;
264
- for ecx. exp_map. each { |exp_id, defs|
265
- for defs. each { |def|
266
- if ! def. reexp { cont; }
267
- let path = alt check tcx. items. get( exp_id) {
268
- ast_map:: node_export( _, path) { ast_map:: path_to_str( * path) }
269
- } ;
270
- index += [ { val: path, pos: ebml_w. writer. tell( ) } ] ;
271
- ebml_w. start_tag( tag_paths_data_item) ;
272
- encode_name( ebml_w, path) ;
273
- encode_def_id( ebml_w, def. id) ;
274
- ebml_w. end_tag( ) ;
275
- }
263
+ for ecx. reexports. each { |reexport|
264
+ let ( path, def_id) = reexport;
265
+ index += [ { val: path, pos: ebml_w. writer. tell( ) } ] ;
266
+ ebml_w. start_tag( tag_paths_data_item) ;
267
+ encode_name( ebml_w, path) ;
268
+ encode_def_id( ebml_w, def_id) ;
269
+ ebml_w. end_tag( ) ;
276
270
}
277
271
}
278
272
@@ -1071,7 +1065,7 @@ fn encode_metadata(parms: encode_parms, crate: @crate) -> [u8] {
1071
1065
diag: parms. diag,
1072
1066
tcx: parms. tcx,
1073
1067
reachable: parms. reachable,
1074
- exp_map : parms. exp_map ,
1068
+ reexports : parms. reexports ,
1075
1069
impl_map: parms. impl_map,
1076
1070
item_symbols: parms. item_symbols,
1077
1071
discrim_symbols: parms. discrim_symbols,
0 commit comments