@@ -340,6 +340,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
340
340
| clean:: EnumItem ( ..)
341
341
| clean:: TypedefItem ( ..)
342
342
| clean:: TraitItem ( ..)
343
+ | clean:: TraitAliasItem ( ..)
343
344
| clean:: FunctionItem ( ..)
344
345
| clean:: ModuleItem ( ..)
345
346
| clean:: ForeignFunctionItem ( ..)
@@ -350,26 +351,43 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
350
351
| clean:: ForeignTypeItem
351
352
| clean:: MacroItem ( ..)
352
353
| clean:: ProcMacroItem ( ..)
353
- | clean:: VariantItem ( ..)
354
- if !self . cache . stripped_mod =>
355
- {
356
- // Re-exported items mean that the same id can show up twice
357
- // in the rustdoc ast that we're looking at. We know,
358
- // however, that a re-exported item doesn't show up in the
359
- // `public_items` map, so we can skip inserting into the
360
- // paths map if there was already an entry present and we're
361
- // not a public item.
362
- if !self . cache . paths . contains_key ( & item. def_id )
363
- || self . cache . access_levels . is_public ( item. def_id )
364
- {
365
- self . cache . paths . insert ( item. def_id , ( self . cache . stack . clone ( ) , item. type_ ( ) ) ) ;
354
+ | clean:: VariantItem ( ..) => {
355
+ if !self . cache . stripped_mod {
356
+ // Re-exported items mean that the same id can show up twice
357
+ // in the rustdoc ast that we're looking at. We know,
358
+ // however, that a re-exported item doesn't show up in the
359
+ // `public_items` map, so we can skip inserting into the
360
+ // paths map if there was already an entry present and we're
361
+ // not a public item.
362
+ if !self . cache . paths . contains_key ( & item. def_id )
363
+ || self . cache . access_levels . is_public ( item. def_id )
364
+ {
365
+ self . cache
366
+ . paths
367
+ . insert ( item. def_id , ( self . cache . stack . clone ( ) , item. type_ ( ) ) ) ;
368
+ }
366
369
}
367
370
}
368
371
clean:: PrimitiveItem ( ..) => {
369
372
self . cache . paths . insert ( item. def_id , ( self . cache . stack . clone ( ) , item. type_ ( ) ) ) ;
370
373
}
371
374
372
- _ => { }
375
+ clean:: ExternCrateItem { .. }
376
+ | clean:: ImportItem ( ..)
377
+ | clean:: OpaqueTyItem ( ..)
378
+ | clean:: ImplItem ( ..)
379
+ | clean:: TyMethodItem ( ..)
380
+ | clean:: MethodItem ( ..)
381
+ | clean:: StructFieldItem ( ..)
382
+ | clean:: AssocConstItem ( ..)
383
+ | clean:: AssocTypeItem ( ..)
384
+ | clean:: StrippedItem ( ..)
385
+ | clean:: KeywordItem ( ..) => {
386
+ // FIXME: Do these need handling?
387
+ // The person writing this comment doesn't know.
388
+ // So would rather leave them to an expert,
389
+ // as at least the list is better than `_ => {}`.
390
+ }
373
391
}
374
392
375
393
// Maintain the parent stack
0 commit comments