@@ -3024,7 +3024,7 @@ impl Method {
3024
3024
let function = function_item. expect_function ( ) ;
3025
3025
let times_seen = function. codegen ( ctx, result, function_item) ;
3026
3026
let Some ( times_seen) = times_seen else { return } ;
3027
- let signature_item = ctx. resolve_item ( function. signature ( ) ) ;
3027
+ let signature_item: & Item = ctx. resolve_item ( function. signature ( ) ) ;
3028
3028
let mut name = match self . kind ( ) {
3029
3029
MethodKind :: Constructor => "new" . into ( ) ,
3030
3030
MethodKind :: Destructor => "destruct" . into ( ) ,
@@ -3146,7 +3146,13 @@ impl Method {
3146
3146
3147
3147
let block = ctx. wrap_unsafe_ops ( quote ! ( #( #stmts ) ; * ) ) ;
3148
3148
3149
- let mut attrs = vec ! [ attributes:: inline( ) ] ;
3149
+ let mut attrs: Vec < proc_macro2:: TokenStream > = vec ! [ attributes:: inline( ) ] ;
3150
+ attrs. extend (
3151
+ function_item. annotations ( )
3152
+ . attributes ( )
3153
+ . iter ( )
3154
+ . map ( |s| s. parse ( ) . unwrap ( ) ) ,
3155
+ ) ;
3150
3156
3151
3157
let custom_attributes = ctx. options ( ) . all_callbacks ( |cb| {
3152
3158
cb. add_attributes ( & AttributeInfo {
@@ -4602,6 +4608,12 @@ impl CodeGenerator for Function {
4602
4608
}
4603
4609
4604
4610
let mut attributes = vec ! [ ] ;
4611
+ attributes. extend (
4612
+ item. annotations ( )
4613
+ . attributes ( )
4614
+ . iter ( )
4615
+ . map ( |s| s. parse ( ) . unwrap ( ) ) ,
4616
+ ) ;
4605
4617
4606
4618
let custom_attributes = ctx. options ( ) . all_callbacks ( |cb| {
4607
4619
cb. add_attributes ( & AttributeInfo {
0 commit comments