From 8cb2ff6e2e26af5745a55f8918b0671aa5d986a1 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Fri, 13 Mar 2015 23:44:18 -0700 Subject: [PATCH] Fix multiple unnamed enum seq/map variants Closes #32. --- tests/test_macros.rs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/test_macros.rs b/tests/test_macros.rs index b693715e..a7156dea 100644 --- a/tests/test_macros.rs +++ b/tests/test_macros.rs @@ -50,6 +50,25 @@ enum SerEnum<'a, B: 'a, C: /* Trait + */ 'a, D> where D: /* Trait + */ 'a { e: &'a mut D, //f: ::Type, }, + + // Make sure we can support more than one variant. + _Unit2, + _Seq2( + i8, + B, + &'a C, + //C::Type, + &'a mut D, + //::Type, + ), + _Map2 { + a: i8, + b: B, + c: &'a C, + //d: C::Type, + e: &'a mut D, + //f: ::Type, + }, } #[derive(Debug, PartialEq)] @@ -72,6 +91,25 @@ enum DeEnum /* where D: Trait */ { e: D, //f: ::Type, }, + + // Make sure we can support more than one variant. + _Unit2, + _Seq2( + i8, + B, + C, + //C::Type, + D, + //::Type, + ), + _Map2 { + a: i8, + b: B, + c: C, + //d: C::Type, + e: D, + //f: ::Type, + }, } #[test]