Open snawaz opened 5 years ago
Just ran into this with diesel
's Insertable
derive macro as well. The #[table_name = "..."]
attribute suddenly becomes unknown and wont compile. To get around this I manually derived Serialize
onto the base struct, created a wrapper struct and had to do
#[derive(Response, Serialize)]
#[serde(transparent)]
struct Wrapper(Inner);
(according to the docs, I shouldn't need to derive Serialize
there, but got the same error about the serde
attribute as above without it)
Found out the same thing that serde()
don't work and you need to manually add Serialize
and/or Deserialize
to the derive
s. Should we actually update the docs or there is a bug here?
The following code fails to compile:
with this error message:
And
LINE 3
, it compiles fine.LINE 5
, it compiles fine.That implies
Response
doesn't work whenprost
is present.