Test for incorrect remote type deserializing

This commit is contained in:
David Tolnay 2017-04-10 12:15:40 -07:00
parent 2deacf8eaa
commit ad5bf04c4e
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -0,0 +1,12 @@
#[macro_use]
extern crate serde_derive;
mod remote {
pub struct S(pub u16);
}
#[derive(Deserialize)] //~ ERROR: mismatched types
#[serde(remote = "remote::S")]
struct S(u8); //~^^ expected u16, found u8
fn main() {}