Skip to content
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

Support Option with custom enums in JS #1214

Merged
merged 1 commit into from
Jan 29, 2019

Conversation

alexcrichton
Copy link
Contributor

Find a hole automatically to use a sentinel value for None, and then
just wire everything up!

Closes #1198

@@ -970,6 +984,8 @@ impl MacroParse<()> for syn::ItemEnum {
lit: syn::Lit::Int(ref int_lit),
}),
)) => {
if !has_discriminant {
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some strange formatting going on here...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wut

Find a hole automatically to use a sentinel value for `None`, and then
just wire everything up!

Closes rustwasm#1198
@alexcrichton alexcrichton merged commit cf1e1e0 into rustwasm:master Jan 29, 2019
@alexcrichton alexcrichton deleted the enum-option branch January 29, 2019 15:57
@fitzgen fitzgen added the TWiRaWA Nominate this PR for inclusion in the next issue of This Week in Rust and WebAssembly label Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TWiRaWA Nominate this PR for inclusion in the next issue of This Week in Rust and WebAssembly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants