Skip to content

rustdoc: Remove Foreign{Function,Static} item types #19503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 5, 2014

Conversation

lifthrasiir
Copy link
Contributor

This series of commits deals with broken links to the source code. It also refactors some repetitive codes from Rustdoc. The most important commit, 1cb1f00, describes the rationale; this will fix a half of #16289. Other commits are reasonably independent to each other and can be made into indiviudal PRs at the request.

Notes on the broken source links

As of bda97e8 (I've used this to check the PR works as intended), there are 281 (!) such broken links. They can be further classified as follows:

Prevalence of this kind of bugs calls for a full link verifier integrated into the testing process. :S

In particular, ItemType variants are no longer reexported. Since
we already do namespace them via `item_type` mod, it's fine.
They are just (unsafe) functions and static items to most users
and even compilers! The metadata doesn't distinguish them, so Rustdoc
ended up producing broken links (generated `ffi.*.html`, links to
`fn.*.html`). It would be best to avoid this pitfall at all.
Otherwise the generated documentation is 30% larger. The sidebar
renders an entry for each item to all items, so large modules have
O(n^2) items rendered in the sidebars. Not a correct solution, but
at least it works.
@tomjakubowski
Copy link
Contributor

Wonderful! 👏 for fixing rustdoc bugs

@alexcrichton alexcrichton merged commit 1068855 into rust-lang:master Dec 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants