Serialization of Haskell style enums

This commit is contained in:
David Tolnay
2017-02-19 16:04:39 -08:00
parent 4538143d00
commit a3fe03c323
4 changed files with 161 additions and 238 deletions
+2 -4
View File
@@ -494,7 +494,7 @@ fn deserialize_item_enum(type_ident: &syn::Ident,
attr::EnumTag::External => {
deserialize_externally_tagged_enum(type_ident, impl_generics, ty, variants, item_attrs)
}
attr::EnumTag::Internal(ref tag) => {
attr::EnumTag::Internal { ref tag } => {
deserialize_internally_tagged_enum(type_ident,
impl_generics,
ty,
@@ -502,9 +502,7 @@ fn deserialize_item_enum(type_ident: &syn::Ident,
item_attrs,
tag)
}
attr::EnumTag::Adjacent(ref tag, ref content) => {
panic!("FIXME: unimplemented")
}
attr::EnumTag::Adjacent { .. } => unimplemented!(),
attr::EnumTag::None => {
deserialize_untagged_enum(type_ident, impl_generics, ty, variants, item_attrs)
}