mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 00:08:01 +00:00
fix(errors): Report errors on unknown #[serde(...)] attributes
Closes #51, #175, and #187
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user