Update tests to new location of errors

This commit is contained in:
David Tolnay 2016-09-27 00:17:00 -07:00
parent 0c18c151e2
commit 40b874214a
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 17 additions and 17 deletions

View File

@ -1,14 +1,14 @@
#![feature(custom_attribute, custom_derive, plugin)]
#![plugin(serde_macros)]
#[derive(Serialize)]
#[derive(Serialize)] //~ ERROR: 6 errors:
struct S {
#[serde(rename(serialize="x"))]
#[serde(rename(serialize="y"))] //~ ERROR: duplicate serde attribute `rename`
#[serde(rename(serialize="y"))] // ERROR: duplicate serde attribute `rename`
a: (),
#[serde(rename(serialize="x"))]
#[serde(rename="y")] //~ ERROR: duplicate serde attribute `rename`
#[serde(rename="y")] // ERROR: duplicate serde attribute `rename`
b: (),
#[serde(rename(serialize="x"))]
@ -16,16 +16,16 @@ struct S {
c: (),
#[serde(rename="x")]
#[serde(rename(deserialize="y"))] //~ ERROR: duplicate serde attribute `rename`
#[serde(rename(deserialize="y"))] // ERROR: duplicate serde attribute `rename`
d: (),
#[serde(rename(serialize="x", serialize="y"))] //~ ERROR: duplicate serde attribute `rename`
#[serde(rename(serialize="x", serialize="y"))] // ERROR: duplicate serde attribute `rename`
e: (),
#[serde(rename="x", serialize="y")] //~ ERROR: unknown serde field attribute `serialize = "y"`
#[serde(rename="x", serialize="y")] // ERROR: unknown serde field attribute `serialize`
f: (),
#[serde(rename(serialize="x"), rename(serialize="y"))] //~ ERROR: duplicate serde attribute `rename`
#[serde(rename(serialize="x"), rename(serialize="y"))] // ERROR: duplicate serde attribute `rename`
g: (),
}

View File

@ -3,27 +3,27 @@
extern crate serde;
#[derive(Serialize)]
#[serde(abc="xyz")] //~ unknown serde container attribute `abc = "xyz"`
#[derive(Serialize)] //~ unknown serde container attribute `abc`
#[serde(abc="xyz")]
struct Foo {
x: u32,
}
#[derive(Deserialize)]
#[serde(abc="xyz")] //~ unknown serde container attribute `abc = "xyz"`
#[derive(Deserialize)] //~ unknown serde container attribute `abc`
#[serde(abc="xyz")]
struct Foo {
x: u32,
}
#[derive(Serialize)]
#[derive(Serialize)] //~ unknown serde field attribute `abc`
struct Foo {
#[serde(abc="xyz")] //~ unknown serde field attribute `abc = "xyz"`
#[serde(abc="xyz")]
x: u32,
}
#[derive(Deserialize)]
#[derive(Deserialize)] //~ unknown serde field attribute `abc`
struct Foo {
#[serde(abc="xyz")] //~ unknown serde field attribute `abc = "xyz"`
#[serde(abc="xyz")]
x: u32,
}

View File

@ -1,9 +1,9 @@
#![feature(custom_attribute, custom_derive, plugin)]
#![plugin(serde_macros)]
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize)] //~ ERROR: Serde does not support deserializing fields of type &str
struct Test<'a> {
s: &'a str, //~ ERROR: Serde does not support deserializing fields of type &str
s: &'a str,
}
fn main() {}