mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-25 18:37:55 +00:00
b0eee50947
Conflicts:
serde_macros/tests/compile-fail/reject-unknown-attributes.rs
31 lines
562 B
Rust
31 lines
562 B
Rust
#![feature(custom_attribute, custom_derive, plugin)]
|
|
#![plugin(serde_macros)]
|
|
|
|
extern crate serde;
|
|
|
|
#[derive(Serialize)] //~ unknown serde container attribute `abc`
|
|
#[serde(abc="xyz")]
|
|
struct A {
|
|
x: u32,
|
|
}
|
|
|
|
#[derive(Deserialize)] //~ unknown serde container attribute `abc`
|
|
#[serde(abc="xyz")]
|
|
struct B {
|
|
x: u32,
|
|
}
|
|
|
|
#[derive(Serialize)] //~ unknown serde field attribute `abc`
|
|
struct C {
|
|
#[serde(abc="xyz")]
|
|
x: u32,
|
|
}
|
|
|
|
#[derive(Deserialize)] //~ unknown serde field attribute `abc`
|
|
struct D {
|
|
#[serde(abc="xyz")]
|
|
x: u32,
|
|
}
|
|
|
|
fn main() { }
|