Skip to content

Commit d95b7b3

Browse files
Fix formatting
1 parent 5661fe3 commit d95b7b3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,12 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
839839
let self_id = if item.is_fake() {
840840
None
841841
// Checking if the item is a field in a variant in an enum
842-
} else if (matches!(self.cx.tcx.def_kind(item.def_id), DefKind::Field) && matches!(self.cx.tcx.def_kind(self.cx.tcx.parent(item.def_id).unwrap()), DefKind::Variant)) {
842+
} else if (matches!(self.cx.tcx.def_kind(item.def_id), DefKind::Field)
843+
&& matches!(
844+
self.cx.tcx.def_kind(self.cx.tcx.parent(item.def_id).unwrap()),
845+
DefKind::Variant
846+
))
847+
{
843848
self.cx.tcx.parent(item.def_id).and_then(|item_id| self.cx.tcx.parent(item_id))
844849
} else if matches!(
845850
self.cx.tcx.def_kind(item.def_id),

0 commit comments

Comments
 (0)