more cfail tests

This commit is contained in:
Oliver Schneider 2016-06-13 18:56:45 +02:00
parent b838651ac9
commit 4c4a27f53c
No known key found for this signature in database
GPG Key ID: 56D6EEA0FC67AC46
2 changed files with 22 additions and 0 deletions

View 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() {}

View 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() {}