Test unknown field in remote struct
This commit is contained in:
parent
174867295b
commit
6a6606cd64
16
test_suite/tests/compile-fail/remote/unknown_field.rs
Normal file
16
test_suite/tests/compile-fail/remote/unknown_field.rs
Normal 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() {}
|
Loading…
x
Reference in New Issue
Block a user