Skip to content

Commit 49553bb

Browse files
committed
Remove hack that is no longer necessary
This hack was added in 6ab1f05. I don't know what change allowed removing the hack, but that commit added a test (which I presume covered the hack's behavior), and all tests are passing with this change. So, I think it should be good.
1 parent 1f213d9 commit 49553bb

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -958,17 +958,7 @@ impl<'a, 'tcx> DocVisitor for LinkCollector<'a, 'tcx> {
958958
{
959959
self.cx.tcx.parent(did)
960960
}
961-
Some(did) => match self.cx.tcx.parent(did) {
962-
// HACK(jynelson): `clean` marks associated types as `TypedefItem`, not as `AssocTypeItem`.
963-
// Fixing this breaks `fn render_deref_methods`.
964-
// As a workaround, see if the parent of the item is an `impl`; if so this must be an associated item,
965-
// regardless of what rustdoc wants to call it.
966-
Some(parent) => {
967-
let parent_kind = self.cx.tcx.def_kind(parent);
968-
Some(if parent_kind == DefKind::Impl { parent } else { did })
969-
}
970-
None => Some(did),
971-
},
961+
Some(did) => Some(did),
972962
};
973963

974964
// FIXME(jynelson): this shouldn't go through stringification, rustdoc should just use the DefId directly

0 commit comments

Comments
 (0)