Respect variant skip attribute in inferred bounds

This commit is contained in:
David Tolnay
2018-05-07 21:30:00 -07:00
parent 8c0efc3d77
commit c4181f46be
3 changed files with 26 additions and 10 deletions
+10
View File
@@ -592,6 +592,16 @@ fn test_gen() {
#[derive(Deserialize)]
#[serde(tag = "t", content = "c")]
enum AdjacentlyTaggedVoid {}
#[derive(Serialize, Deserialize)]
enum SkippedVariant<T> {
#[serde(skip)]
#[allow(dead_code)]
T(T),
Unit,
}
assert::<SkippedVariant<X>>();
}
//////////////////////////////////////////////////////////////////////////