Closed richarddd closed 9 months ago
If i have one rust module with two structs that have the methods attribute the proc macro will create name conflicts:
example.rs
#[rquickjs::class] #[derive(rquickjs::class::Trace)] pub struct A; #[rquickjs::methods] impl A { fn new() -> Self { Self } } #[rquickjs::class] #[derive(rquickjs::class::Trace)] pub struct B; #[rquickjs::methods] impl B { fn new() -> Self { Self } }
conflicting implementation forexample::__impl_new``
conflicting implementation for
To solve this, the generated __impl_ could contain the struct name as well.
__impl_
I can work around this by using a different file for each struct or different names for the functions, but it would be nice if this was supported 🥇
This is already fixed, the hidden module now contains the class name.
If i have one rust module with two structs that have the methods attribute the proc macro will create name conflicts:
example.rs
conflicting implementation for
example::__impl_new``To solve this, the generated
__impl_
could contain the struct name as well.I can work around this by using a different file for each struct or different names for the functions, but it would be nice if this was supported 🥇