Skip to content

rustdoc: refine cross-crate impl inlining - #33002

Merged
bors merged 3 commits into
rust-lang:masterfrom
mitaa:rdoc-cross-impls
Apr 19, 2016
Merged

rustdoc: refine cross-crate impl inlining#33002
bors merged 3 commits into
rust-lang:masterfrom
mitaa:rdoc-cross-impls

Conversation

@mitaa

@mitaamitaa commented Apr 15, 2016

Copy link
Copy Markdown
Contributor

This changes the current rule that impls within doc(hidden) modules aren't inlined, to only inlining impls where the implemented trait and type are reachable in documentation.

fixes#14586
fixes#31948

.. and also applies the reachability checking to cross-crate links.

fixes#28480

r? @alexcrichton

The thread-local isn't needed and consists of mostly empty fields which
were just used to move the data into `html::render::CACHE_KEY`.
@mitaa
mitaaforce-pushed the rdoc-cross-impls branch 2 times, most recently from 78f29ce to 9589d72CompareApril 15, 2016 18:57
Comment threadsrc/librustdoc/clean/inline.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.

After thinking more about this, this probably doesn't matter since an impl in an external crate can't reference a local type or trait (right??).

mitaa added 2 commits April 18, 2016 01:55
This changes the current rule that impls within `doc(hidden)` modules
aren't inlined, to only inlining impls where the implemented
trait and type are reachable in documentation.
@mitaa

mitaa commented Apr 18, 2016

Copy link
Copy Markdown
ContributorAuthor

Hmm, this probably doesn't yet fix this since this isn't related to inlining.

#![crate_type="lib"]pubtraitBar{}#[doc(hidden)]pubmod hidden {pubstructFoo;}// impl shown in `foo::Bar`s implementors section (but without link)implBarfor hidden::Foo{}

edit: filed as #33069

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+ 77b409a

Holy cow, knocking out pre-15k bugs, nice!

@bors

bors commented Apr 19, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 77b409a with merge 478a33d...

bors added a commit that referenced this pull request Apr 19, 2016
rustdoc: refine cross-crate impl inlining
This changes the current rule that impls within `doc(hidden)` modules aren't inlined, to only inlining impls where the implemented trait and type are reachable in documentation.
fixes#14586fixes#31948
.. and also applies the reachability checking to cross-crate links.
fixes#28480
r? @alexcrichton
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants

@mitaa@alexcrichton@bors