Extern "Lua" functions should be able to act as constructors

This commit is contained in:
lumi 2025-06-27 23:04:05 +10:00
parent 5ea532f1c6
commit a760beabc1
Signed by: luaneko
GPG Key ID: 406809B8763FF07A

View File

@ -688,11 +688,6 @@ fn parse_lua_function_attrs(attrs: &mut Vec<Attribute>) -> Result<LuaFunctionAtt
if let Some(name) = attr.path().get_ident()
&& let Ok(method) = Metamethod::try_from(&name.unraw())
{
match method {
Metamethod::New => syn_error!(attr, r#"cannot be applied to a lua function"#),
_ => {}
}
parsed.metamethod = Some(method);
attrs.remove(i);
} else {