mozilla/rust — pull request #11409 by alexcrichton (2014-01-08 20:09:21+00:00)
Title: Improve the documentation of primitive types

In today's rustdoc world, if you have the simple question of "What can I do with `i8`?" it turns out the answer is "good luck". The reason for this is that there is no page in the rustdoc documentation which shows any information about primitive types.

This commit adds support for a lang item per primitive which is allowed to define inherent methods of primitive types. This alleviates concerns of duplicate inherent impls for primitive types, and also allows in theory removal of lots of satellite traits lying around.

Additionally, I have added support to rustdoc to render pretty pages for all primitive types. Additionally, all mentions of primitive types are hyperlinked to their definition (as one might expect).

* http://www.contrib.andrew.cmu.edu/~acrichto/doc/std/
* http://www.contrib.andrew.cmu.edu/~acrichto/doc/extra/
* http://www.contrib.andrew.cmu.edu/~acrichto/doc/std/uint/primitive.uint.html

I didn't remove any traits other than `Times` (for a direct inherent impl on `uint`), but in theory many more can be removed in the future.

The astute may notice that this is not done for string and vector types yet. I haven't quite figured out how to do that just yet.