@@ -252,27 +252,6 @@ impl<'a, 'tcx, 'encoder> ItemContentBuilder<'a, 'tcx, 'encoder> {
252252 }
253253}
254254
255- /// Iterates through "auxiliary node IDs", which are node IDs that describe
256- /// top-level items that are sub-items of the given item. Specifically:
257- ///
258- /// * For newtype structs, iterates through the node ID of the constructor.
259- fn each_auxiliary_node_id < F > ( item : & hir:: Item , callback : F ) -> bool where
260- F : FnOnce ( NodeId ) -> bool ,
261- {
262- let mut continue_ = true ;
263- match item. node {
264- hir:: ItemStruct ( ref struct_def, _) => {
265- // If this is a newtype struct, return the constructor.
266- if struct_def. is_tuple ( ) {
267- continue_ = callback ( struct_def. id ( ) ) ;
268- }
269- }
270- _ => { }
271- }
272-
273- continue_
274- }
275-
276255fn encode_reexports ( ecx : & EncodeContext ,
277256 rbml_w : & mut Encoder ,
278257 id : NodeId ) {
@@ -313,13 +292,6 @@ impl<'a, 'tcx, 'encoder> ItemContentBuilder<'a, 'tcx, 'encoder> {
313292 for item_id in & md. item_ids {
314293 self . rbml_w . wr_tagged_u64 ( tag_mod_child,
315294 def_to_u64 ( ecx. tcx . map . local_def_id ( item_id. id ) ) ) ;
316-
317- let item = ecx. tcx . map . expect_item ( item_id. id ) ;
318- each_auxiliary_node_id ( item, |auxiliary_node_id| {
319- self . rbml_w . wr_tagged_u64 ( tag_mod_child,
320- def_to_u64 ( ecx. tcx . map . local_def_id ( auxiliary_node_id) ) ) ;
321- true
322- } ) ;
323295 }
324296
325297 self . encode_visibility ( vis) ;
0 commit comments