Skip to content

Commit 3898e3c

Browse files
committed
---
yaml --- r: 31142 b: refs/heads/dist-snap c: a407f74 h: refs/heads/master v: v3
1 parent 52d4040 commit 3898e3c

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: e8e143b9d794f61aad664fb2d141304e6f640792
10+
refs/heads/dist-snap: a407f74d6d3ccf13dc188c64b70b9a86db831f6b
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/test/run-pass/reflect-visit-data.rs

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// FIXME: un-xfail after snapshot
2-
// xfail-test
31

42
import intrinsic::{tydesc, get_tydesc, visit_tydesc, ty_visitor};
53
import libc::c_void;
@@ -32,16 +30,16 @@ impl ptr_visitor<V: ty_visitor movable_ptr>
3230

3331
#[inline(always)]
3432
fn bump(sz: uint) {
35-
self.inner.move_ptr() {|p|
33+
do self.inner.move_ptr() |p| {
3634
((p as uint) + sz) as *c_void
37-
}
35+
};
3836
}
3937

4038
#[inline(always)]
4139
fn align(a: uint) {
42-
self.inner.move_ptr() {|p|
40+
do self.inner.move_ptr() |p| {
4341
align(p as uint, a) as *c_void
44-
}
42+
};
4543
}
4644

4745
#[inline(always)]
@@ -247,9 +245,9 @@ impl ptr_visitor<V: ty_visitor movable_ptr>
247245
}
248246

249247
fn visit_vec(mtbl: uint, inner: *tydesc) -> bool {
250-
self.align_to::<[u8]>();
248+
self.align_to::<~[u8]>();
251249
if ! self.inner.visit_vec(mtbl, inner) { ret false; }
252-
self.bump_past::<[u8]>();
250+
self.bump_past::<~[u8]>();
253251
true
254252
}
255253

@@ -407,7 +405,7 @@ impl ptr_visitor<V: ty_visitor movable_ptr>
407405

408406
fn visit_trait() -> bool {
409407
self.align_to::<ty_visitor>();
410-
if ! self.inner.visit_iface() { ret false; }
408+
if ! self.inner.visit_trait() { ret false; }
411409
self.bump_past::<ty_visitor>();
412410
true
413411
}
@@ -492,16 +490,16 @@ impl of ty_visitor for my_visitor {
492490
fn visit_bot() -> bool { true }
493491
fn visit_nil() -> bool { true }
494492
fn visit_bool() -> bool {
495-
self.get::<bool>() {|b|
493+
do self.get::<bool>() |b| {
496494
self.vals += ~[bool::to_str(b)];
497-
}
498-
true
495+
};
496+
true
499497
}
500498
fn visit_int() -> bool {
501-
self.get::<int>() {|i|
499+
do self.get::<int>() |i| {
502500
self.vals += ~[int::to_str(i, 10u)];
503-
}
504-
true
501+
};
502+
true
505503
}
506504
fn visit_i8() -> bool { true }
507505
fn visit_i16() -> bool { true }
@@ -623,9 +621,9 @@ fn main() {
623621
let v = v as ty_visitor;
624622
visit_tydesc(td, v);
625623

626-
for (copy u.vals).each {|s|
624+
for (copy u.vals).each |s| {
627625
io::println(#fmt("val: %s", s));
628626
}
629627
#error("%?", copy u.vals);
630-
assert u.vals == ["1", "2", "3", "true", "false", "5", "4", "3"];
628+
assert u.vals == ~["1", "2", "3", "true", "false", "5", "4", "3"];
631629
}

0 commit comments

Comments
 (0)