Test transparent attribute

This commit is contained in:
David Tolnay
2018-05-20 13:53:29 -07:00
parent 0a4d536253
commit 1335f85213
2 changed files with 47 additions and 0 deletions
+8
View File
@@ -653,6 +653,14 @@ fn test_gen() {
X,
),
}
#[derive(Serialize, Deserialize)]
#[serde(transparent)]
struct TransparentWith {
#[serde(serialize_with = "ser_x")]
#[serde(deserialize_with = "de_x")]
x: X,
}
}
//////////////////////////////////////////////////////////////////////////