Add empty associated_types in expand_derive

This commit is contained in:
Thomas Bahn 2015-02-06 13:32:17 +01:00
parent e2568ddfac
commit 3b5d71fbb5
2 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#![feature(plugin_registrar, quote, unboxed_closures)]
#![feature(plugin_registrar, quote, unboxed_closures, rustc_private)]
extern crate syntax;
extern crate rustc;
@ -73,6 +73,7 @@ fn expand_derive_serialize<>(cx: &mut ExtCtxt,
path: Path::new(vec!["serde2", "ser", "Serialize"]),
additional_bounds: Vec::new(),
generics: LifetimeBounds::empty(),
associated_types: vec![],
methods: vec![
MethodDef {
name: "visit",
@ -260,6 +261,7 @@ pub fn expand_derive_deserialize(cx: &mut ExtCtxt,
vec!(Box::new(Literal(Path::new_local("__E")))), true))),
("__E", None, vec!()))
},
associated_types: vec![],
methods: vec!(
MethodDef {
name: "deserialize_token",

View File

@ -1,7 +1,7 @@
#![crate_name = "serde_macros"]
#![crate_type = "dylib"]
#![feature(plugin_registrar, quote, unboxed_closures)]
#![feature(plugin_registrar, quote, unboxed_closures, rustc_private)]
extern crate syntax;
extern crate rustc;
@ -110,7 +110,8 @@ fn expand_derive_serialize(cx: &mut ExtCtxt,
combine_substructure: combine_substructure(Box::new( |a, b, c| {
serialize_substructure(a, b, c, item)
})),
})
}),
associated_types: vec!()
};
trait_def.expand(cx, mitem, item, |item| push.call_mut((item,)))
@ -241,7 +242,8 @@ pub fn expand_derive_deserialize(cx: &mut ExtCtxt,
combine_substructure: combine_substructure(Box::new(|a, b, c| {
deserialize_substructure(a, b, c)
})),
})
}),
associated_types: vec!()
};
trait_def.expand(cx, mitem, item, |item| push.call_mut((item,)))