Require exhaustive pattern matching in switch! parser
diff --git a/src/derive.rs b/src/derive.rs
index 9e68d5e..a0c1c8d 100644
--- a/src/derive.rs
+++ b/src/derive.rs
@@ -57,8 +57,7 @@
which: alt!(
syn!(Struct) => { Ok }
|
- // weird hack to get around exhaustiveness check below
- syn!(Enum) => { |e| Err((e, 1)) }
+ syn!(Enum) => { Err }
) >>
id: syn!(Ident) >>
generics: syn!(Generics) >>
@@ -78,7 +77,7 @@
}),
})
|
- Err((e, 1)) => map!(enum_body, move |(wh, body, brace)| DeriveInput {
+ Err(e) => map!(enum_body, move |(wh, body, brace)| DeriveInput {
ident: id,
vis: vis,
attrs: attrs,