-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add support for extern_spec
for enum
#586
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One major comment, but overall it looks good.
I don't mind the hack (I considered myself). I was settling into something more sophisticated and expanding the macro to:
#[flux::extern(enum)]
mod _extern_option {
type Option<T> = core::option::Option<T>;
enum FakeOption<T> {
#[flux::variant(Option<T>[false])]
None,
#[flux::variant((T) -> Option<T>[true])
Some(T)
}
}
but that requires a bit more thought and in the end it's equally hacky.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The following now works