@@ -924,19 +924,6 @@ impl<'a> Item<'a> {
924
924
925
925
impl < ' a > fmt:: Show for Item < ' a > {
926
926
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
-
940
927
// Write the breadcrumb trail header for the top
941
928
try!( write ! ( fmt. buf, "\n <h1 class='fqn'>" ) ) ;
942
929
match self . item . inner {
@@ -964,6 +951,21 @@ impl<'a> fmt::Show for Item<'a> {
964
951
try!( write ! ( fmt. buf, "<a class='{}' href=''>{}</a>" ,
965
952
shortty( self . item) , self . item. name. get_ref( ) . as_slice( ) ) ) ;
966
953
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
967
969
if self . cx . include_sources {
968
970
let mut path = Vec :: new ( ) ;
969
971
clean_srcpath ( self . item . source . filename . as_bytes ( ) , |component| {
0 commit comments