We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74f3e04 commit f0cb0ebCopy full SHA for f0cb0eb
src/librustdoc/html/render.rs
@@ -565,9 +565,16 @@ impl DocFolder for Cache {
565
clean::StructItem(..) | clean::EnumItem(..) |
566
clean::TypedefItem(..) | clean::TraitItem(..) |
567
clean::FunctionItem(..) | clean::ModuleItem(..) |
568
- clean::ForeignFunctionItem(..) | clean::VariantItem(..) => {
+ clean::ForeignFunctionItem(..) => {
569
self.paths.insert(item.id, (self.stack.clone(), shortty(&item)));
570
}
571
+ // link variants to their parent enum because pages aren't emitted
572
+ // for each variant
573
+ clean::VariantItem(..) => {
574
+ let mut stack = self.stack.clone();
575
+ stack.pop();
576
+ self.paths.insert(item.id, (stack, "enum"));
577
+ }
578
_ => {}
579
580
0 commit comments