Ignore skipped fields when looking for borrowed lifetimes

This commit is contained in:
David Tolnay committed 2017-11-03 10:08:02 -07:00
1 parent 2a557a1e36
commit d5e5c520ac
2 files changed
+11 -1

No files matched your search

+8
View File
@@ -511,6 +511,14 @@ fn test_gen() {
Tuple(&'a str, &'static str),
Newtype(&'static str),
}
#[derive(Serialize, Deserialize)]
struct SkippedStaticStr {
#[serde(skip_deserializing)]
skipped: &'static str,
other: isize,
}
assert::<SkippedStaticStr>();
}
//////////////////////////////////////////////////////////////////////////