Skip to content

Commit 6c5c7f5

Browse files
committed
Fix rebase
1 parent a9c14dc commit 6c5c7f5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ impl FragmentKind {
263263
DefKind::AssocTy => FragmentKind::AssociatedType,
264264
DefKind::Variant => FragmentKind::Variant,
265265
DefKind::Field => {
266-
if tcx.def_kind(tcx.parent(def_id).unwrap()) == DefKind::Variant {
266+
if tcx.def_kind(tcx.parent(def_id)) == DefKind::Variant {
267267
FragmentKind::VariantField
268268
} else {
269269
FragmentKind::StructField
@@ -509,10 +509,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
509509
Res::Def(
510510
DefKind::AssocFn | DefKind::AssocConst | DefKind::AssocTy | DefKind::Variant,
511511
def_id,
512-
) => {
513-
let parent_def_id = self.cx.tcx.parent(def_id).unwrap();
514-
(Res::from_def_id(self.cx.tcx, parent_def_id), Some(def_id))
515-
}
512+
) => (Res::from_def_id(self.cx.tcx, self.cx.tcx.parent(def_id)), Some(def_id)),
516513
_ => ((res, None)),
517514
});
518515
} else if ns == MacroNS {

0 commit comments

Comments
 (0)