This commit hooks rustdoc into the stability index infrastructure in two
ways:
1. It looks up stability levels via the index, rather than by manual
attributes.
2. It adds stability level information throughout rustdoc output, rather
than just at the top header. In particular, a stability color (with
mouseover text) appears next to essentially every item that appears
in rustdoc's HTML output.
Along the way, the stability index code has been lightly refactored.
impl<'a, T: Show> Show for &'a mut T {
fn fmt(&self, f: &mut Formatter) -> Result { secret_show(&**self, f) }
}
+impl<'a> Show for &'a Show {
+ fn fmt(&self, f: &mut Formatter) -> Result { (*self).fmt(f) }
+}
impl Bool for bool {
fn fmt(&self, f: &mut Formatter) -> Result {
t!(format!("{foo_bar}", foo_bar=1i), "1");
t!(format!("{:d}", 5i + 5i), "10");
+ let a: &fmt::Show = &1i;
+ t!(format!("{}", a), "1");
+
// Formatting strings and their arguments
t!(format!("{:s}", "a"), "a");
t!(format!("{:4s}", "a"), "a ");