@@ -924,19 +924,6 @@ impl<'a> Item<'a> {
924924
925925impl < ' a > fmt:: Show for Item < ' a > {
926926 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
927- match attr:: find_stability ( self . item . attrs . iter ( ) ) {
928- Some ( ref stability) => {
929- try!( write ! ( fmt. buf,
930- "<a class='stability {lvl}' title='{reason}'>{lvl}</a>" ,
931- lvl = stability. level. to_str( ) ,
932- reason = match stability. text {
933- Some ( ref s) => ( * s) . clone( ) ,
934- None => InternedString :: new( "" ) ,
935- } ) ) ;
936- }
937- None => { }
938- }
939-
940927 // Write the breadcrumb trail header for the top
941928 try!( write ! ( fmt. buf, "\n <h1 class='fqn'>" ) ) ;
942929 match self . item . inner {
@@ -964,6 +951,21 @@ impl<'a> fmt::Show for Item<'a> {
964951 try!( write ! ( fmt. buf, "<a class='{}' href=''>{}</a>" ,
965952 shortty( self . item) , self . item. name. get_ref( ) . as_slice( ) ) ) ;
966953
954+ // Write stability attributes
955+ match attr:: find_stability ( self . item . attrs . iter ( ) ) {
956+ Some ( ref stability) => {
957+ try!( write ! ( fmt. buf,
958+ "<a class='stability {lvl}' title='{reason}'>{lvl}</a>" ,
959+ lvl = stability. level. to_str( ) ,
960+ reason = match stability. text {
961+ Some ( ref s) => ( * s) . clone( ) ,
962+ None => InternedString :: new( "" ) ,
963+ } ) ) ;
964+ }
965+ None => { }
966+ }
967+
968+ // Write `src` tag
967969 if self . cx . include_sources {
968970 let mut path = Vec :: new ( ) ;
969971 clean_srcpath ( self . item . source . filename . as_bytes ( ) , |component| {
0 commit comments