more cfail tests
This commit is contained in:
parent
b838651ac9
commit
4c4a27f53c
13
serde_macros/tests/compile-fail/duplicate_attributes.rs_
Normal file
13
serde_macros/tests/compile-fail/duplicate_attributes.rs_
Normal file
@ -0,0 +1,13 @@
|
||||
#![feature(custom_attribute, custom_derive, plugin)]
|
||||
#![plugin(serde_macros)]
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct S {
|
||||
#[serde(rename(serialize="x"))]
|
||||
#[serde(rename(serialize="y"))] //~ ERROR buldternua
|
||||
#[serde(rename(deserialize="y"))] // ok
|
||||
#[serde(rename="y")] // error
|
||||
z: i32,
|
||||
}
|
||||
|
||||
fn main() {}
|
9
serde_macros/tests/compile-fail/str_ref_deser.rs
Normal file
9
serde_macros/tests/compile-fail/str_ref_deser.rs
Normal file
@ -0,0 +1,9 @@
|
||||
#![feature(custom_attribute, custom_derive, plugin)]
|
||||
#![plugin(serde_macros)]
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct Test<'a> {
|
||||
s: &'a str, //~ ERROR: Serde does not support deserializing fields of type &str
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
x
Reference in New Issue
Block a user