Skip to content

Commit

Permalink
Move FIXME to if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
CraftSpider committed Jan 13, 2022
1 parent aafcbf1 commit 474e091
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustdoc/json/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
/// the hashmap because certain items (traits and types) need to have their mappings for trait
/// implementations filled out before they're inserted.
fn item(&mut self, item: clean::Item) -> Result<(), Error> {
// FIXME(CraftSpider): We skip children of local blanket implementations, as we'll have
// already seen the actual generic impl, and the generated ones don't need documenting.
// This is necessary due to the visibility, return type, and self arg of the generated
// impls not quite matching, and will no longer be necessary when the mismatch is fixed.
let local_blanket_impl = match item.def_id {
clean::ItemId::Blanket { impl_id, .. } => impl_id.is_local(),
clean::ItemId::Auto { .. }
Expand All @@ -183,6 +179,10 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
};

// Flatten items that recursively store other items
// FIXME(CraftSpider): We skip children of local blanket implementations, as we'll have
// already seen the actual generic impl, and the generated ones don't need documenting.
// This is necessary due to the visibility, return type, and self arg of the generated
// impls not quite matching, and will no longer be necessary when the mismatch is fixed.
if !local_blanket_impl {
item.kind.inner_items().for_each(|i| self.item(i.clone()).unwrap());
}
Expand Down

0 comments on commit 474e091

Please sign in to comment.