mlua_derive: Fix #[lua(meta, field)] case

This commit is contained in:
Alex Orlenko
2026-05-31 12:28:06 +01:00
parent 208a70f407
commit fcab60bac4
2 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -356,7 +356,7 @@ pub fn userdata_impl(attr: TokenStream, item: TokenStream) -> TokenStream {
let lua_name = lua_attr.name(fn_name);
if lua_attr.meta {
let tokens = quote! {
registry.add_meta_field(#lua_name, #type_path::#fn_name);
registry.add_meta_field(#lua_name, #type_path::#fn_name());
};
registration_calls.push(with_cfg(tokens, &method.attrs));
} else {