about summary refs log tree commit diff
path: root/src/liballoc_system
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-09-06 11:24:18 +0000
committerbors <bors@rust-lang.org>2017-09-06 11:24:18 +0000
commita20953906056f85f71896795e762ac242e1891aa (patch)
tree900231998a6226ba52127819ec0e74d129557b04 /src/liballoc_system
parentf83d20eff734310a0381b7c71e0192988b6b0847 (diff)
parenta9f0f6df94c4d08fe300b6e06941aea9c7324530 (diff)
downloadrust-a20953906056f85f71896795e762ac242e1891aa.tar.gz
rust-a20953906056f85f71896795e762ac242e1891aa.zip
Auto merge of #43849 - QuietMisdreavus:foreign-impls, r=steveklabnik
rustdoc: add new "Implementations on Foreign Types" section to traits

Demo screenshot:

![image](https://user-images.githubusercontent.com/5217170/29281219-c547f758-80e3-11e7-808f-49f592c65c5b.png)

Full demo available at https://tonberry.quietmisdreavus.net/foreign-test/foreign_test/trait.CheckIt.html

This PR splits the "Implementors" section on trait pages into two: First, for impls on types local to the crate, their impls are kept as-is, printing one line for the impl line, and any additional lines for associated types. However, for types external to the crate, they are now pulled up over the others and are printed (almost) like the summary impl on the type page itself. This gives any doc comments on these impls or methods to be exposed in the documentation.

There's just one small problem, though: [libstd docs apparently surface impls for libc and rand, possibly among others](https://tonberry.quietmisdreavus.net/foreign-std/std/marker/trait.Copy.html#foreign-impls). This adds this section to pages in the std docs where we might not want them to show up in the first place. I think this is a bug distinct from this PR, but it does make it drastically apparent.

~~My question, then, is this: Do we want this here? Taking it out involves fixing which impls are visible to rustdoc, possibly specifically when rendering the std facade. I'm convinced this is fine to land as-is, since it adds a feature specifically for non-std crates (i'm thinking of things like `num` or related crates that implement things on primitives or std types as part of their functionality).~~ (EDIT: I have an open PR to fix this: https://github.com/rust-lang/rust/pull/44026)
Diffstat (limited to 'src/liballoc_system')
0 files changed, 0 insertions, 0 deletions