Open
Description
Consider this snippet.
#[derive(GodotClass)]
#[class(rename = "Not an identifier")]
struct MyTupleStruct(String);
This is incorrect for two reasons. First, the rename
key demands an identifier, but it's been given a string. Second, you cannot derive GodotClass on a tuple struct. Upon compilation, this yields only one error.
error: expected identifier
--> itest\rust\src\object_tests\class_rename_test.rs:27:18
|
27 | #[class(rename = "Not an identifier")]
| ^^^^^^^^^^^^^^^^^^^
Upon fixing this and recompiling, you see a new error.
error: #[derive(GodotClass)] not supported for tuple structs
--> itest\rust\src\object_tests\class_rename_test.rs:29:21
|
29 | struct MyTupleStruct(String);
| ^^^^^^^^
Fixing this issue requires some degree of redesign and would likely invalidate the work done to solve the first error. As such, this latter error should be encountered first before any other errors in related macros.