@@ -327,6 +327,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
327
327
| clean:: EnumItem ( ..)
328
328
| clean:: TypedefItem ( ..)
329
329
| clean:: TraitItem ( ..)
330
+ | clean:: TraitAliasItem ( ..)
330
331
| clean:: FunctionItem ( ..)
331
332
| clean:: ModuleItem ( ..)
332
333
| clean:: ForeignFunctionItem ( ..)
@@ -337,26 +338,43 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
337
338
| clean:: ForeignTypeItem
338
339
| clean:: MacroItem ( ..)
339
340
| 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
+ }
353
356
}
354
357
}
355
358
clean:: PrimitiveItem ( ..) => {
356
359
self . cache . paths . insert ( item. def_id , ( self . cache . stack . clone ( ) , item. type_ ( ) ) ) ;
357
360
}
358
361
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
+ }
360
378
}
361
379
362
380
// Maintain the parent stack
0 commit comments