Add a test for #2044

This commit is contained in:
Seiichi Uchida 2017-10-08 22:37:13 +09:00
parent 530a845d2f
commit be9b1b5332
2 changed files with 22 additions and 0 deletions

View File

@ -35,3 +35,12 @@ fn new_foo() -> Foo {
bar: 0,
}
}
// #2044
pub enum State {
Closure(#[cfg_attr(feature = "serde_derive", serde(state_with = "::serialization::closure"))] GcPtr<ClosureData>),
}
struct Fields(
#[cfg_attr(feature = "serde_derive", serde(state_with = "::base::serialization::shared"))] Arc<Vec<InternedStr>>,
);

View File

@ -33,3 +33,16 @@ fn new_foo() -> Foo {
bar: 0,
}
}
// #2044
pub enum State {
Closure(
#[cfg_attr(feature = "serde_derive", serde(state_with = "::serialization::closure"))]
GcPtr<ClosureData>,
),
}
struct Fields(
#[cfg_attr(feature = "serde_derive", serde(state_with = "::base::serialization::shared"))]
Arc<Vec<InternedStr>>,
);