mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 21:51:04 +00:00
Add empty associated_types in expand_derive
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#![feature(plugin_registrar, quote, unboxed_closures)]
|
#![feature(plugin_registrar, quote, unboxed_closures, rustc_private)]
|
||||||
|
|
||||||
extern crate syntax;
|
extern crate syntax;
|
||||||
extern crate rustc;
|
extern crate rustc;
|
||||||
@@ -73,6 +73,7 @@ fn expand_derive_serialize<>(cx: &mut ExtCtxt,
|
|||||||
path: Path::new(vec!["serde2", "ser", "Serialize"]),
|
path: Path::new(vec!["serde2", "ser", "Serialize"]),
|
||||||
additional_bounds: Vec::new(),
|
additional_bounds: Vec::new(),
|
||||||
generics: LifetimeBounds::empty(),
|
generics: LifetimeBounds::empty(),
|
||||||
|
associated_types: vec![],
|
||||||
methods: vec![
|
methods: vec![
|
||||||
MethodDef {
|
MethodDef {
|
||||||
name: "visit",
|
name: "visit",
|
||||||
@@ -260,6 +261,7 @@ pub fn expand_derive_deserialize(cx: &mut ExtCtxt,
|
|||||||
vec!(Box::new(Literal(Path::new_local("__E")))), true))),
|
vec!(Box::new(Literal(Path::new_local("__E")))), true))),
|
||||||
("__E", None, vec!()))
|
("__E", None, vec!()))
|
||||||
},
|
},
|
||||||
|
associated_types: vec![],
|
||||||
methods: vec!(
|
methods: vec!(
|
||||||
MethodDef {
|
MethodDef {
|
||||||
name: "deserialize_token",
|
name: "deserialize_token",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#![crate_name = "serde_macros"]
|
#![crate_name = "serde_macros"]
|
||||||
#![crate_type = "dylib"]
|
#![crate_type = "dylib"]
|
||||||
|
|
||||||
#![feature(plugin_registrar, quote, unboxed_closures)]
|
#![feature(plugin_registrar, quote, unboxed_closures, rustc_private)]
|
||||||
|
|
||||||
extern crate syntax;
|
extern crate syntax;
|
||||||
extern crate rustc;
|
extern crate rustc;
|
||||||
@@ -110,7 +110,8 @@ fn expand_derive_serialize(cx: &mut ExtCtxt,
|
|||||||
combine_substructure: combine_substructure(Box::new( |a, b, c| {
|
combine_substructure: combine_substructure(Box::new( |a, b, c| {
|
||||||
serialize_substructure(a, b, c, item)
|
serialize_substructure(a, b, c, item)
|
||||||
})),
|
})),
|
||||||
})
|
}),
|
||||||
|
associated_types: vec!()
|
||||||
};
|
};
|
||||||
|
|
||||||
trait_def.expand(cx, mitem, item, |item| push.call_mut((item,)))
|
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| {
|
combine_substructure: combine_substructure(Box::new(|a, b, c| {
|
||||||
deserialize_substructure(a, b, c)
|
deserialize_substructure(a, b, c)
|
||||||
})),
|
})),
|
||||||
})
|
}),
|
||||||
|
associated_types: vec!()
|
||||||
};
|
};
|
||||||
|
|
||||||
trait_def.expand(cx, mitem, item, |item| push.call_mut((item,)))
|
trait_def.expand(cx, mitem, item, |item| push.call_mut((item,)))
|
||||||
|
|||||||
Reference in New Issue
Block a user