mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 21:51:04 +00:00
Test missing field in remote struct
This commit is contained in:
@@ -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() {}
|
||||||
Reference in New Issue
Block a user