mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 04:48:01 +00:00
Test for incorrect remote type deserializing
This commit is contained in:
@@ -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() {}
|
||||
Reference in New Issue
Block a user