From def8d6e8afc2dcbbd96d3db486b286c295ef46df Mon Sep 17 00:00:00 2001 From: Osspial Date: Tue, 10 Apr 2018 11:16:23 -0400 Subject: [PATCH] Add associated type test --- test_suite/tests/test_gen.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test_suite/tests/test_gen.rs b/test_suite/tests/test_gen.rs index 368403e7..a524c772 100644 --- a/test_suite/tests/test_gen.rs +++ b/test_suite/tests/test_gen.rs @@ -539,6 +539,22 @@ fn test_gen() { array: [u8; 256], } assert_ser::(); + + trait AssocSerde { + type Assoc; + } + + struct NoSerdeImpl; + impl AssocSerde for NoSerdeImpl { + type Assoc = u32; + } + + #[derive(Serialize, Deserialize)] + struct AssocDerive { + assoc: T::Assoc + } + + assert::>(); } //////////////////////////////////////////////////////////////////////////