Test unknown field in remote struct

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

View File

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