mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 21:48:02 +00:00
fix(errors): Report errors on unknown #[serde(...)] attributes
Closes #51, #175, and #187
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#![feature(custom_attribute, custom_derive, plugin)]
|
||||
#![plugin(serde_macros)]
|
||||
|
||||
extern crate serde;
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(abc="xyz")] //~ unknown serde container attribute `abc = "xyz"`
|
||||
struct Foo {
|
||||
x: u32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(abc="xyz")] //~ unknown serde container attribute `abc = "xyz"`
|
||||
struct Foo {
|
||||
x: u32,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct Foo {
|
||||
#[serde(abc="xyz")] //~ unknown serde field attribute `abc = "xyz"`
|
||||
x: u32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct Foo {
|
||||
#[serde(abc="xyz")] //~ unknown serde field attribute `abc = "xyz"`
|
||||
x: u32,
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
Reference in New Issue
Block a user