about summary refs log tree commit diff
path: root/configure
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-07-30 17:42:32 +0000
committerbors <bors@rust-lang.org>2017-07-30 17:42:32 +0000
commit489b792babba74b57f1793e91a76fd1f55972759 (patch)
tree2f795a538eed9faf3d02ca49355ba4f854e582a0 /configure
parent477e9f01714b6dffa1fb75e95b890d7abc2fcc52 (diff)
parent612081a78d136c7ad0b63dd3454ceb727d0e69c5 (diff)
downloadrust-489b792babba74b57f1793e91a76fd1f55972759.tar.gz
rust-489b792babba74b57f1793e91a76fd1f55972759.zip
Auto merge of #43515 - QuietMisdreavus:show-assoc-types, r=GuillaumeGomez
rustdoc: print associated types in traits "implementors" section

When viewing a trait's implementors, they won't show anything about the implementation other than any bounds on the generics. You can see the full implementation details on the page for the type, but if the type is external (e.g. it's an extension trait being implemented for primitives), then you'll never be able to see the details of the implementation without opening the source code. This doesn't solve everything about that, but it does still show an incredibly useful piece of information: the associated types. This can help immensely for traits like `Deref` or `IntoIterator` in libstd, and also for traits like `IntoFuture` outside the standard library.

Fixes #24200

🚨 BIKESHED ALERT 🚨 The indentation and sizing of the types is suspect. I put it in the small text so it wouldn't blend in with the next impl line. (It shares a CSS class with the where clauses, as you can see in the following image.) However, the indentation is nonstandard. I initially tried with no indentation (looked awkward and blended too well with the surrounding impls) and with 4-space indentation (too easy to confuse with where clauses), before settling on the 2-space indentation seen below. It's... okay, i guess. Open to suggestions.

![snippet of the implementors of IntoIterator, showing the associated types](https://user-images.githubusercontent.com/5217170/28697456-a4e01a12-7301-11e7-868e-2a6441d6c9e0.png)
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions