@@ -327,6 +327,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
327327 | clean:: EnumItem ( ..)
328328 | clean:: TypedefItem ( ..)
329329 | clean:: TraitItem ( ..)
330+ | clean:: TraitAliasItem ( ..)
330331 | clean:: FunctionItem ( ..)
331332 | clean:: ModuleItem ( ..)
332333 | clean:: ForeignFunctionItem ( ..)
@@ -337,26 +338,43 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
337338 | clean:: ForeignTypeItem
338339 | clean:: MacroItem ( ..)
339340 | clean:: ProcMacroItem ( ..)
340- | clean:: VariantItem ( ..)
341- if !self . cache . stripped_mod =>
342- {
343- // Re-exported items mean that the same id can show up twice
344- // in the rustdoc ast that we're looking at. We know,
345- // however, that a re-exported item doesn't show up in the
346- // `public_items` map, so we can skip inserting into the
347- // paths map if there was already an entry present and we're
348- // not a public item.
349- if !self . cache . paths . contains_key ( & item. def_id )
350- || self . cache . access_levels . is_public ( item. def_id )
351- {
352- self . cache . paths . insert ( item. def_id , ( self . cache . stack . clone ( ) , item. type_ ( ) ) ) ;
341+ | clean:: VariantItem ( ..) => {
342+ if !self . cache . stripped_mod {
343+ // Re-exported items mean that the same id can show up twice
344+ // in the rustdoc ast that we're looking at. We know,
345+ // however, that a re-exported item doesn't show up in the
346+ // `public_items` map, so we can skip inserting into the
347+ // paths map if there was already an entry present and we're
348+ // not a public item.
349+ if !self . cache . paths . contains_key ( & item. def_id )
350+ || self . cache . access_levels . is_public ( item. def_id )
351+ {
352+ self . cache
353+ . paths
354+ . insert ( item. def_id , ( self . cache . stack . clone ( ) , item. type_ ( ) ) ) ;
355+ }
353356 }
354357 }
355358 clean:: PrimitiveItem ( ..) => {
356359 self . cache . paths . insert ( item. def_id , ( self . cache . stack . clone ( ) , item. type_ ( ) ) ) ;
357360 }
358361
359- _ => { }
362+ clean:: ExternCrateItem { .. }
363+ | clean:: ImportItem ( ..)
364+ | clean:: OpaqueTyItem ( ..)
365+ | clean:: ImplItem ( ..)
366+ | clean:: TyMethodItem ( ..)
367+ | clean:: MethodItem ( ..)
368+ | clean:: StructFieldItem ( ..)
369+ | clean:: AssocConstItem ( ..)
370+ | clean:: AssocTypeItem ( ..)
371+ | clean:: StrippedItem ( ..)
372+ | clean:: KeywordItem ( ..) => {
373+ // FIXME: Do these need handling?
374+ // The person writing this comment doesn't know.
375+ // So would rather leave them to an expert,
376+ // as at least the list is better than `_ => {}`.
377+ }
360378 }
361379
362380 // Maintain the parent stack
0 commit comments