Skip to content
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

rustdoc: make rustdoc less pass-aware #32678

Merged
merged 3 commits into from
Apr 5, 2016
Merged

Conversation

mitaa
Copy link
Contributor

@mitaa mitaa commented Apr 2, 2016

Instead of hardcoding knowledge about the strip-private pass into the
rendering process we represent (some) stripped items as ItemEnum::StrippedItem.

Rustdoc will, for example, generate redirect pages for public items
contained in private modules which have been re-exported to somewhere
externally reachable - this will now not only work for the strip-private
pass, but for other passes as well, such as the strip-hidden pass.

r? @alexcrichton

Instead of hardcoding knowledge about the strip-private pass into the
rendering process we represent (some) stripped items as `ItemEnum::StrippedItem`.

Rustdoc will, for example, generate redirect pages for public items
contained in private modules which have been re-exported to somewhere
externally reachable - this will now not only work for the `strip-private`
pass, but for other passes as well, such as the `strip-hidden` pass.
mitaa added 2 commits April 2, 2016 13:47
Like the comment on `Context` explains, `Context` is supposed to be
lightweight, so we're putting everything that's immutable after
creation of the Context behind an `Arc<SharedContext>`.
self.retained.insert(i.def_id);
Some(i)
}
i.and_then(|i| { match i.inner {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stylistically we tend to avoid this sort of shorten-the-match-statement I believe

@alexcrichton
Copy link
Member

@bors: r+ 95eb8a6

Awesome, thanks @mitaa! I had just one stylistic nit but feel free to fix in a follow-up PR !

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 5, 2016
rustdoc: make rustdoc less pass-aware

Instead of hardcoding knowledge about the strip-private pass into the
rendering process we represent (some) stripped items as `ItemEnum::StrippedItem`.

Rustdoc will, for example, generate redirect pages for public items
contained in private modules which have been re-exported to somewhere
externally reachable - this will now not only work for the `strip-private`
pass, but for other passes as well, such as the `strip-hidden` pass.

r? @alexcrichton
bors added a commit that referenced this pull request Apr 5, 2016
Rollup of 11 pull requests

- Successful merges: #32403, #32596, #32675, #32678, #32685, #32686, #32692, #32710, #32712, #32714, #32715
- Failed merges: #32488
@bors bors merged commit 95eb8a6 into rust-lang:master Apr 5, 2016
@mitaa mitaa deleted the rdoc-stripped branch April 6, 2016 02:52
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