Open coderedart opened 2 years ago
for some reason, i cannot implement the TypeBody for types with lifetimes. rust complains that it needs a 'static
lifetime.
If i remember correctly, the macro quickly gets complex once generics of any kind get involved, which is why I haven't done it myself. I'll gladly accept pr's that make it work though.
I'll see what I can do about the typebody needing a static lifetime. Probably just wrote a weird lifetime myself.
However, are you sure you actually need a non static in this case? Type body is only used to generate the .d.tl file and documentation and doesn't even require an instance of the type
However, are you sure you actually need a non static in this case? Type body is only used to generate the .d.tl file and documentation and doesn't even require an instance of the type
you are right! i was able to implement TypeBody
for a 'static lifetimed struct.
I will just implement the Traits manually for now.
I have a bunch of types like
Window<'open>
orUi(&mut egui::Ui)
etc.. and i would like to useMluTealrDerive
on them.but i keep getting lifetime errors. i can manually write the impls ofcourse, was just wondering if it would be possible to just make the macro support for types with lifetimes.