Delete serde_macros

This commit is contained in:
David Tolnay
2016-09-28 09:55:54 -07:00
parent 8b7b886036
commit 1b6fd5a362
23 changed files with 129 additions and 148 deletions
@@ -0,0 +1,12 @@
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: custom derive attribute panicked
struct S {
#[serde(rename="x", serialize="y")] // ERROR: unknown serde field attribute `serialize`
x: (),
}
fn main() {}
@@ -0,0 +1,13 @@
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: custom derive attribute panicked
struct S {
#[serde(rename="x")]
#[serde(rename(deserialize="y"))] // ERROR: duplicate serde attribute `rename`
x: (),
}
fn main() {}
@@ -0,0 +1,12 @@
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: custom derive attribute panicked
struct S {
#[serde(rename(serialize="x"), rename(serialize="y"))] // ERROR: duplicate serde attribute `rename`
x: (),
}
fn main() {}
@@ -0,0 +1,13 @@
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: custom derive attribute panicked
struct S {
#[serde(rename(serialize="x"))]
#[serde(rename="y")] // ERROR: duplicate serde attribute `rename`
x: (),
}
fn main() {}
@@ -0,0 +1,12 @@
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: custom derive attribute panicked
struct S {
#[serde(rename(serialize="x", serialize="y"))] // ERROR: duplicate serde attribute `rename`
x: (),
}
fn main() {}
@@ -0,0 +1,13 @@
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: custom derive attribute panicked
struct S {
#[serde(rename(serialize="x"))]
#[serde(rename(serialize="y"))] // ERROR: duplicate serde attribute `rename`
x: (),
}
fn main() {}
@@ -0,0 +1,11 @@
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize, Deserialize)] //~ ERROR: custom derive attribute panicked
struct Test<'a> {
s: &'a str, // ERROR: Serde does not support deserializing fields of type &str
}
fn main() {}
@@ -0,0 +1,12 @@
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: custom derive attribute panicked
#[serde(abc="xyz")] // ERROR: unknown serde container attribute `abc`
struct A {
x: u32,
}
fn main() { }
@@ -0,0 +1,12 @@
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: custom derive attribute panicked
struct C {
#[serde(abc="xyz")] // ERROR: unknown serde field attribute `abc`
x: u32,
}
fn main() { }
@@ -0,0 +1,12 @@
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)] //~ ERROR: custom derive attribute panicked
enum E {
#[serde(abc="xyz")] // ERROR: unknown serde variant attribute `abc`
V,
}
fn main() { }