Test for incorrect remote type deserializing
This commit is contained in:
parent
2deacf8eaa
commit
ad5bf04c4e
12
test_suite/tests/compile-fail/remote/wrong_de.rs
Normal file
12
test_suite/tests/compile-fail/remote/wrong_de.rs
Normal 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() {}
|
Loading…
Reference in New Issue
Block a user