Skip to content

rustdoc: improve crate-local inlining - #32142

Merged
bors merged 3 commits into
rust-lang:masterfrom
mitaa:rdoc-maybe-inline-local
Mar 12, 2016
Merged

rustdoc: improve crate-local inlining#32142
bors merged 3 commits into
rust-lang:masterfrom
mitaa:rdoc-maybe-inline-local

Conversation

@mitaa

@mitaamitaa commented Mar 9, 2016

Copy link
Copy Markdown
Contributor

@mitaa
mitaaforce-pushed the rdoc-maybe-inline-local branch 2 times, most recently from 91ea7c7 to 1953f4bCompareMarch 9, 2016 01:22
Comment threadsrc/librustdoc/visit_ast.rs Outdated

Copy link
Copy Markdown
ContributorAuthor

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
mitaaforce-pushed the rdoc-maybe-inline-local branch 2 times, most recently from 7792679 to 18506c8CompareMarch 9, 2016 17:45
@alexcrichton

Copy link
Copy Markdown
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 :(

@alexcrichtonalexcrichton self-assigned this Mar 10, 2016
@mitaa
mitaaforce-pushed the rdoc-maybe-inline-local branch from 18506c8 to 7c98399CompareMarch 10, 2016 02:31
@mitaa

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
@bors

bors commented Mar 12, 2016

Copy link
Copy Markdown
Collaborator

⌛ 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:masterMar 12, 2016
@mitaa
mitaa deleted the rdoc-maybe-inline-local branch March 13, 2016 05:41
Sign up for freeto 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

@mitaa@alexcrichton@bors