File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,18 @@ fn generate_op2(
102
102
op_fn. sig . generics . params . clear ( ) ;
103
103
op_fn. sig . ident = call. clone ( ) ;
104
104
105
+ // create raw version
106
+ let mut raw_fn = func. clone ( ) ;
107
+ let raw_ident = format_ident ! ( "{}__raw_fn" , & func. sig. ident) ;
108
+ raw_fn. sig . ident = raw_ident. clone ( ) ;
109
+ raw_fn. attrs . retain ( |attr| !is_attribute_special ( attr) ) ;
110
+ for arg in raw_fn. sig . inputs . iter_mut ( ) {
111
+ match arg {
112
+ FnArg :: Receiver ( slf) => slf. attrs . clear ( ) ,
113
+ FnArg :: Typed ( ty) => ty. attrs . clear ( ) ,
114
+ }
115
+ }
116
+
105
117
// Clear inert attributes
106
118
// TODO(mmastrac): This should limit itself to clearing ours only
107
119
for arg in op_fn. sig . inputs . iter_mut ( ) {
@@ -320,6 +332,9 @@ fn generate_op2(
320
332
321
333
<#name <#( #generic) , * > as :: deno_core:: _ops:: Op >:: DECL
322
334
}
335
+
336
+ #[ allow( unused, non_snake_case) ]
337
+ #raw_fn
323
338
} )
324
339
}
325
340
You can’t perform that action at this time.
0 commit comments