Skip to content

Commit b690015

Browse files
committed
---
yaml --- r: 22458 b: refs/heads/master c: 8ad4e92 h: refs/heads/master v: v3
1 parent 461fc97 commit b690015

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 7b265035661daefd7d30f05896a748e55bb561b0
2+
refs/heads/master: 8ad4e92c2bf1b40f88c4bad4b8c1243c13d16af6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libsyntax/ext/auto_serialize.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,6 @@ fn ser_ty(cx: ext_ctxt, tps: ser_tps_map,
459459
~[]
460460
}
461461

462-
ast::ty_vstore(@{node: ast::ty_vec(mt),_}, ast::vstore_uniq) |
463462
ast::ty_vec(mt) {
464463
let ser_e =
465464
cx.expr(
@@ -477,6 +476,11 @@ fn ser_ty(cx: ext_ctxt, tps: ser_tps_map,
477476
}]
478477
}
479478

479+
// For unique vstores, just pass through to the underlying vec or str
480+
ast::ty_vstore(ty, ast::vstore_uniq) {
481+
ser_ty(cx, tps, ty, s, v)
482+
}
483+
480484
ast::ty_vstore(_, _) {
481485
cx.span_unimpl(ty.span, "serialization for vstore types");
482486
}
@@ -685,12 +689,16 @@ fn deser_ty(cx: ext_ctxt, tps: deser_tps_map,
685689
#ast{ fail }
686690
}
687691

688-
ast::ty_vstore(@{node: ast::ty_vec(mt),_}, ast::vstore_uniq) |
689692
ast::ty_vec(mt) {
690693
let l = deser_lambda(cx, tps, mt.ty, cx.clone(d));
691694
#ast{ std::serialization::read_to_vec($(d), $(l)) }
692695
}
693696

697+
// For unique vstores, just pass through to the underlying vec or str
698+
ast::ty_vstore(ty, ast::vstore_uniq) {
699+
deser_ty(cx, tps, ty, d)
700+
}
701+
694702
ast::ty_vstore(_, _) {
695703
cx.span_unimpl(ty.span, "deserialization for vstore types");
696704
}

0 commit comments

Comments
 (0)