@@ -1071,7 +1071,7 @@ impl CodeGenerator for Type {
10711071 cb. add_attributes ( & AttributeInfo {
10721072 name : & name,
10731073 kind : AttributeItemKind :: Struct ,
1074- method_kind : None ,
1074+ fn_kind : None ,
10751075 } )
10761076 } ) ;
10771077 attributes. extend (
@@ -2538,7 +2538,7 @@ impl CodeGenerator for CompInfo {
25382538 } else {
25392539 AttributeItemKind :: Struct
25402540 } ,
2541- method_kind : None ,
2541+ fn_kind : None ,
25422542 } )
25432543 } ) ;
25442544 attributes. extend ( custom_attributes. iter ( ) . map ( |s| s. parse ( ) . unwrap ( ) ) ) ;
@@ -3154,7 +3154,7 @@ impl Method {
31543154 cb. add_attributes ( & AttributeInfo {
31553155 name : & canonical_name,
31563156 kind : AttributeItemKind :: Function ,
3157- method_kind : Some ( self . kind ( ) ) ,
3157+ fn_kind : Some ( FunctionKind :: Method ( self . kind ( ) ) ) ,
31583158 } )
31593159 } ) ;
31603160 attrs. extend ( custom_attributes. iter ( ) . map ( |s| s. parse ( ) . unwrap ( ) ) ) ;
@@ -3740,7 +3740,7 @@ impl CodeGenerator for Enum {
37403740 cb. add_attributes ( & AttributeInfo {
37413741 name : & name,
37423742 kind : AttributeItemKind :: Enum ,
3743- method_kind : None ,
3743+ fn_kind : None ,
37443744 } )
37453745 } ) ;
37463746 attrs. extend ( custom_attributes. iter ( ) . map ( |s| s. parse ( ) . unwrap ( ) ) ) ;
@@ -4605,6 +4605,15 @@ impl CodeGenerator for Function {
46054605
46064606 let mut attributes = vec ! [ ] ;
46074607
4608+ let custom_attributes = ctx. options ( ) . all_callbacks ( |cb| {
4609+ cb. add_attributes ( & AttributeInfo {
4610+ name : & canonical_name,
4611+ kind : AttributeItemKind :: Function ,
4612+ fn_kind : Some ( self . kind ( ) ) ,
4613+ } )
4614+ } ) ;
4615+ attributes. extend ( custom_attributes. iter ( ) . map ( |s| s. parse ( ) . unwrap ( ) ) ) ;
4616+
46084617 if true {
46094618 let must_use = signature. must_use ( ) || {
46104619 let ret_ty = signature
0 commit comments