Test missing field in remote struct

This commit is contained in:
David Tolnay 2017-04-10 12:22:51 -07:00
parent ad5bf04c4e
commit 174867295b
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -0,0 +1,17 @@
#[macro_use]
extern crate serde_derive;
mod remote {
pub struct S {
pub a: u8,
pub b: u8,
}
}
#[derive(Serialize, Deserialize)] //~ ERROR: missing field `b` in initializer of `remote::S`
#[serde(remote = "remote::S")]
struct S {
a: u8, //~^^^ ERROR: missing field `b` in initializer of `remote::S`
}
fn main() {}