@@ -711,7 +711,11 @@ impl<'a> fmt::Display for Stability<'a> {
711711 match * stab {
712712 Some ( ref stability) => {
713713 write ! ( f, "<a class='stability {lvl}' title='{reason}'>{lvl}</a>" ,
714- lvl = stability. level,
714+ lvl = if stability. deprecated_since. is_empty( ) {
715+ format!( "{}" , stability. level)
716+ } else {
717+ "Deprecated" . to_string( )
718+ } ,
715719 reason = stability. reason)
716720 }
717721 None => Ok ( ( ) )
@@ -725,7 +729,11 @@ impl<'a> fmt::Display for ConciseStability<'a> {
725729 match * stab {
726730 Some ( ref stability) => {
727731 write ! ( f, "<a class='stability {lvl}' title='{lvl}{colon}{reason}'></a>" ,
728- lvl = stability. level,
732+ lvl = if stability. deprecated_since. is_empty( ) {
733+ format!( "{}" , stability. level)
734+ } else {
735+ "Deprecated" . to_string( )
736+ } ,
729737 colon = if stability. reason. len( ) > 0 { ": " } else { "" } ,
730738 reason = stability. reason)
731739 }
@@ -763,6 +771,9 @@ impl fmt::Display for ModuleSummary {
763771 try!( write ! ( f, "<span class='summary Unstable' \
764772 style='width: {:.4}%; display: inline-block'> </span>",
765773 ( 100 * cnt. unstable) as f64 /tot as f64 ) ) ;
774+ try!( write ! ( f, "<span class='summary Deprecated' \
775+ style='width: {:.4}%; display: inline-block'> </span>",
776+ ( 100 * cnt. deprecated) as f64 /tot as f64 ) ) ;
766777 try!( write ! ( f, "<span class='summary Unmarked' \
767778 style='width: {:.4}%; display: inline-block'> </span>",
768779 ( 100 * cnt. unmarked) as f64 /tot as f64 ) ) ;
@@ -778,11 +789,12 @@ impl fmt::Display for ModuleSummary {
778789 let mut context = Vec :: new ( ) ;
779790
780791 let tot = self . counts . total ( ) ;
781- let ( stable, unstable, unmarked) = if tot == 0 {
782- ( 0 , 0 , 0 )
792+ let ( stable, unstable, deprecated , unmarked) = if tot == 0 {
793+ ( 0 , 0 , 0 , 0 )
783794 } else {
784795 ( ( 100 * self . counts . stable ) /tot,
785796 ( 100 * self . counts . unstable ) /tot,
797+ ( 100 * self . counts . deprecated ) /tot,
786798 ( 100 * self . counts . unmarked ) /tot)
787799 } ;
788800
@@ -794,11 +806,12 @@ its children (percentages total for {name}):
794806<blockquote>
795807<a class='stability Stable'></a> stable ({}%),<br/>
796808<a class='stability Unstable'></a> unstable ({}%),<br/>
809+ <a class='stability Deprecated'></a> deprecated ({}%),<br/>
797810<a class='stability Unmarked'></a> unmarked ({}%)
798811</blockquote>
799812The counts do not include methods or trait
800813implementations that are visible only through a re-exported type." ,
801- stable, unstable, unmarked,
814+ stable, unstable, deprecated , unmarked,
802815name=self . name) ) ;
803816 try!( write ! ( f, "<table>" ) ) ;
804817 try!( fmt_inner ( f, & mut context, self ) ) ;
0 commit comments