Skip to content

Commit cd93441

Browse files
ericktgraydon
authored andcommitted
auto_serialize2 should fully qualify std::serialization2::deserialize
1 parent 99d84ba commit cd93441

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/libsyntax/ext/auto_serialize2.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,16 @@ fn mk_deser_fields(
437437
f: fn(~[ast::field]) -> @ast::expr
438438
) -> @ast::expr {
439439
let fields = do fields.mapi |idx, field| {
440-
// ast for `|| deserialize(__d)`
440+
// ast for `|| std::serialization2::deserialize(__d)`
441441
let expr_lambda = cx.lambda(
442442
cx.expr_blk(
443443
cx.expr_call(
444444
span,
445-
cx.expr_var(span, ~"deserialize"),
445+
cx.expr_path(span, ~[
446+
cx.ident_of(~"std"),
447+
cx.ident_of(~"serialization2"),
448+
cx.ident_of(~"deserialize"),
449+
]),
446450
~[cx.expr_var(span, ~"__d")]
447451
)
448452
)
@@ -635,11 +639,15 @@ fn mk_enum_deser_variant_nary(
635639
args: ~[ast::variant_arg]
636640
) -> @ast::expr {
637641
let args = do args.mapi |idx, _arg| {
638-
// ast for `|| deserialize(__d)`
642+
// ast for `|| std::serialization2::deserialize(__d)`
639643
let expr_lambda = cx.lambda_expr(
640644
cx.expr_call(
641645
span,
642-
cx.expr_var(span, ~"deserialize"),
646+
cx.expr_path(span, ~[
647+
cx.ident_of(~"std"),
648+
cx.ident_of(~"serialization2"),
649+
cx.ident_of(~"deserialize"),
650+
]),
643651
~[cx.expr_var(span, ~"__d")]
644652
)
645653
);

0 commit comments

Comments
 (0)