File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -229,14 +229,14 @@ fn impl_gdnative_expose(ast: ItemImpl) -> (ItemImpl, ClassMethodExport) {
229
229
. last ( )
230
230
. map ( |i| i. ident . to_string ( ) ) ;
231
231
232
- let ( is_export, is_old_syntax) = if let Some ( "export" ) = last_seg . as_deref ( )
233
- {
234
- ( true , true )
235
- } else if let Some ( "godot" ) = last_seg. as_deref ( ) {
236
- ( true , false )
237
- } else {
238
- ( false , false )
239
- } ;
232
+ let ( is_export, is_old_syntax, macro_name ) =
233
+ if let Some ( "export" ) = last_seg . as_deref ( ) {
234
+ ( true , true , "export" )
235
+ } else if let Some ( "godot" ) = last_seg. as_deref ( ) {
236
+ ( true , false , "godot" )
237
+ } else {
238
+ ( false , false , "unknown" )
239
+ } ;
240
240
241
241
if is_export {
242
242
use syn:: { punctuated:: Punctuated , Lit , Meta , NestedMeta } ;
@@ -363,7 +363,8 @@ fn impl_gdnative_expose(ast: ItemImpl) -> (ItemImpl, ClassMethodExport) {
363
363
}
364
364
} else {
365
365
let msg = format ! (
366
- "unknown option for #[export]: `{}`" ,
366
+ "unknown option for #[{}]: `{}`" ,
367
+ macro_name,
367
368
path. to_token_stream( )
368
369
) ;
369
370
errors. push ( syn:: Error :: new ( nested_meta. span ( ) , msg) ) ;
You can’t perform that action at this time.
0 commit comments