fix(errors): Report errors on unknown #[serde(...)] attributes

Closes #51, #175, and #187
This commit is contained in:
Erick Tryzelaar
2016-01-18 12:39:46 -08:00
parent bfa2b69193
commit 8df841f048
10 changed files with 365 additions and 202 deletions
+5
View File
@@ -18,6 +18,9 @@ extern crate syntax;
#[cfg(not(feature = "with-syntex"))]
extern crate rustc_plugin;
#[cfg(not(feature = "with-syntex"))]
use syntax::feature_gate::AttributeType;
#[cfg(feature = "with-syntex")]
include!(concat!(env!("OUT_DIR"), "/lib.rs"));
@@ -72,4 +75,6 @@ pub fn register(reg: &mut rustc_plugin::Registry) {
syntax::parse::token::intern("derive_Deserialize"),
syntax::ext::base::MultiDecorator(
Box::new(de::expand_derive_deserialize)));
reg.register_attribute("serde".to_owned(), AttributeType::Normal);
}