-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using declare_types with explicit lifetime #207
Comments
Workaround: use |
Is it possible to get this to work with lifetimes other than |
@ryantate13 It is not because the lifetime must be If the struct were valid for a shorter time period, it might become invalid while it is still being held by Javascript. Dereferencing this struct would be a use-after-free bug. Referencing counting (e.g., I'm going to close this issue because it sounds like |
I believe this is a direct consequence of rust-lang/rust#34303 which hopefully will be fixed, but am adding here for awareness.
It doesn't seem possible to have a lifetime on the underlying struct for a Javascript class, eg:
This fails with compile error:
The text was updated successfully, but these errors were encountered: