Closed
Description
I'm attempting to derive Deserialize
and Serialize
for the Or
enum from the or
crate.
Deriving Serialize
works fine:
#[derive(Serialize)] #[serde(untagged, remote = "Or")] enum OrDef<A, B> { A(A), B(B) }
but deriving Deserialize
doesn't:
#[derive(Deserialize)] #[serde(untagged, remote = "Or")] enum OrDef<A, B> { A(A), B(B) }
serde_derive
should be able to automatically write the type bounds for it's impl
, but it is omitting them.
What's even stranger (and helps show the issue) is that, when we remove the remote = "Or"
, it compiles just fine:
#[derive(Deserialize)] #[serde(untagged)] enum Or<A, B> { A(A), B(B) }
[dependencies]
or = "*"
serde = "1.0.8"
serde_derive = "1.0.8"