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: improve crate-local inlining #32142

Merged
merged 3 commits into from
Mar 12, 2016

Conversation

mitaa
Copy link
Contributor

@mitaa mitaa commented Mar 9, 2016

@mitaa mitaa force-pushed the rdoc-maybe-inline-local branch 2 times, most recently from 91ea7c7 to 1953f4b Compare March 9, 2016 01:22
while let Some(id) = cx.map.get_enclosing_scope(node) {
node = id;
if !seen.insert(id) {
break;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not quite sure why this is necessary. (rustdoc/viewpath-self.rs is caught in an infinite loop otherwise)

@mitaa mitaa force-pushed the rdoc-maybe-inline-local branch 2 times, most recently from 7792679 to 18506c8 Compare March 9, 2016 17:45
@alexcrichton
Copy link
Member

Thanks @mitaa! I wonder if we might be able to get away from dealing with the passes for now? Is there a use case where rustdoc is actually being called with various passes and this isn't working?

I tend to view the passes in rustdoc as kinda a half-baked feature which wasn't ever really ready for prime time :(

@alexcrichton alexcrichton self-assigned this Mar 10, 2016
@mitaa mitaa force-pushed the rdoc-maybe-inline-local branch from 18506c8 to 7c98399 Compare March 10, 2016 02:31
@mitaa
Copy link
Contributor Author

mitaa commented Mar 10, 2016

I've backed that commit out for now. The only thing rustdoc is doing "wrong" is overzealous inlining when it isn't required.

It is definitely unfortunate that some passes have to currently to leak out like that such that various points in rustdoc need to have knowledge about them hardcoded in.
That may be better addressed (another time..) by extending the pass system somehow with various hooks into the required stages in rustdoc? IOW by rounding out the pass feature out.

mitaa referenced this pull request in alexcrichton/rust Mar 10, 2016
This is actually a reexported implementation detail in the `rt::v1` module but
rustdoc doesn't like reexporting items from `doc(hidden)` modules. Do what we'd
end up doing anyway from an API perspective and make a public-facing `enum` that
can be retranslated under the hood if necessary.
@alexcrichton
Copy link
Member

@bors: r+ 7c98399

Thanks! Yeah we can try to round out the pass feature later perhaps.

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 12, 2016
…excrichton

rustdoc: improve crate-local inlining

fixes rust-lang#28537

r? @alexcrichton
@bors
Copy link
Contributor

bors commented Mar 12, 2016

⌛ Testing commit 7c98399 with merge beb444e...

bors added a commit that referenced this pull request Mar 12, 2016
@bors bors merged commit 7c98399 into rust-lang:master Mar 12, 2016
@mitaa mitaa deleted the rdoc-maybe-inline-local branch March 13, 2016 05:41
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.

Rustdoc handling of public re-export is broken
3 participants