mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-24 07:38:01 +00:00
Update for rustc 1.0.0-nightly (8903c21d6 2015-01-15 22:42:58 +0000)
This commit is contained in:
@@ -49,12 +49,12 @@ use rustc::plugin::Registry;
|
||||
pub fn plugin_registrar(reg: &mut Registry) {
|
||||
reg.register_syntax_extension(
|
||||
token::intern("derive_serialize"),
|
||||
Decorator(box expand_derive_serialize));
|
||||
Decorator(Box::new(expand_derive_serialize)));
|
||||
|
||||
/*
|
||||
reg.register_syntax_extension(
|
||||
token::intern("derive_deserialize"),
|
||||
ItemDecorator(box expand_derive_deserialize));
|
||||
ItemDecorator(Box::new(expand_derive_deserialize)));
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -89,9 +89,9 @@ fn expand_derive_serialize<>(cx: &mut ExtCtxt,
|
||||
vec!["serde2", "ser", "Visitor"],
|
||||
None,
|
||||
vec![
|
||||
box Literal(Path::new_local("__S")),
|
||||
box Literal(Path::new_local("__R")),
|
||||
box Literal(Path::new_local("__E")),
|
||||
Box::new(Literal(Path::new_local("__S"))),
|
||||
Box::new(Literal(Path::new_local("__R"))),
|
||||
Box::new(Literal(Path::new_local("__E"))),
|
||||
],
|
||||
true
|
||||
),
|
||||
@@ -102,7 +102,7 @@ fn expand_derive_serialize<>(cx: &mut ExtCtxt,
|
||||
explicit_self: borrowed_explicit_self(),
|
||||
args: vec![
|
||||
Ptr(
|
||||
box Literal(Path::new_local("__S")),
|
||||
Box::new(Literal(Path::new_local("__S"))),
|
||||
Borrowed(None, MutMutable)
|
||||
),
|
||||
Literal(
|
||||
@@ -114,16 +114,16 @@ fn expand_derive_serialize<>(cx: &mut ExtCtxt,
|
||||
vec!("std", "result", "Result"),
|
||||
None,
|
||||
vec![
|
||||
box Literal(Path::new_local("__R")),
|
||||
box Literal(Path::new_local("__E")),
|
||||
Box::new(Literal(Path::new_local("__R"))),
|
||||
Box::new(Literal(Path::new_local("__E"))),
|
||||
],
|
||||
true
|
||||
)
|
||||
),
|
||||
attributes: attrs,
|
||||
combine_substructure: combine_substructure(box |a, b, c| {
|
||||
combine_substructure: combine_substructure(Box::new(|a, b, c| {
|
||||
serialize_substructure(a, b, c)
|
||||
}),
|
||||
})),
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -270,14 +270,14 @@ pub fn expand_derive_deserialize(cx: &mut ExtCtxt,
|
||||
span: span,
|
||||
attributes: Vec::new(),
|
||||
path: Path::new_(vec!("serde2", "de", "Deserialize"), None,
|
||||
vec!(box Literal(Path::new_local("__D")),
|
||||
box Literal(Path::new_local("__E"))), true),
|
||||
vec!(Box::new(Literal(Path::new_local("__D"))),
|
||||
Box::new(Literal(Path::new_local("__E")))), true),
|
||||
additional_bounds: Vec::new(),
|
||||
generics: LifetimeBounds {
|
||||
lifetimes: Vec::new(),
|
||||
bounds: vec!(("__D", None, vec!(Path::new_(
|
||||
vec!("serde2", "de", "Deserializer"), None,
|
||||
vec!(box Literal(Path::new_local("__E"))), true))),
|
||||
vec!(Box::new(Literal(Path::new_local("__E")))), true))),
|
||||
("__E", None, vec!()))
|
||||
},
|
||||
methods: vec!(
|
||||
@@ -287,7 +287,7 @@ pub fn expand_derive_deserialize(cx: &mut ExtCtxt,
|
||||
explicit_self: None,
|
||||
args: vec!(
|
||||
Ptr(
|
||||
box Literal(Path::new_local("__D")),
|
||||
Box::new(Literal(Path::new_local("__D"))),
|
||||
Borrowed(None, MutMutable)
|
||||
),
|
||||
Literal(Path::new(vec!("serde2", "de", "Token"))),
|
||||
@@ -297,16 +297,16 @@ pub fn expand_derive_deserialize(cx: &mut ExtCtxt,
|
||||
vec!("std", "result", "Result"),
|
||||
None,
|
||||
vec!(
|
||||
box Self,
|
||||
box Literal(Path::new_local("__E"))
|
||||
Box::new(Self),
|
||||
Box::new(Literal(Path::new_local("__E")))
|
||||
),
|
||||
true
|
||||
)
|
||||
),
|
||||
attributes: Vec::new(),
|
||||
combine_substructure: combine_substructure(box |a, b, c| {
|
||||
combine_substructure: combine_substructure(Box::new(|a, b, c| {
|
||||
deserialize_substructure(a, b, c)
|
||||
}),
|
||||
})),
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user