Skip to content

Commit 67a9bf2

Browse files
committed
---
yaml --- r: 13078 b: refs/heads/master c: 07db8c8 h: refs/heads/master v: v3
1 parent c4738f0 commit 67a9bf2

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
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: b7393ecdf2feb1282abc0edb9b857291187671f2
2+
refs/heads/master: 07db8c8382888975fe1045686a73bba66e13034d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/libstd/bitv.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ fn each(v: bitv, f: fn(bool) -> bool) {
197197
let mut i = 0u;
198198
while i < v.nbits {
199199
if !f(get(v, i)) { break; }
200+
i = i + 1u;
200201
}
201202
}
202203

@@ -233,6 +234,15 @@ fn eq_vec(v0: bitv, v1: [uint]) -> bool {
233234

234235
#[cfg(test)]
235236
mod tests {
237+
#[test]
238+
fn test_to_str() {
239+
let zerolen = bitv(0u, false);
240+
assert to_str(zerolen) == "";
241+
242+
let eightbits = bitv(8u, false);
243+
assert to_str(eightbits) == "00000000";
244+
}
245+
236246
#[test]
237247
fn test_0_elements() {
238248
let mut act;

trunk/src/rustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ fn make_visit_glue(bcx: block, v: ValueRef, t: ty::t) {
644644
assert bcx.ccx().tcx.intrinsic_ifaces.contains_key("ty_visitor");
645645
let (iid, ty) = bcx.ccx().tcx.intrinsic_ifaces.get("ty_visitor");
646646
let v = PointerCast(bcx, v, T_ptr(type_of::type_of(bcx.ccx(), ty)));
647-
bcx = reflect::emit_calls_to_iface_visit_ty(bcx, t, Load(bcx, v), iid);
647+
bcx = reflect::emit_calls_to_iface_visit_ty(bcx, t, v, iid);
648648
build_return(bcx);
649649
}
650650

trunk/src/test/run-pass/reflect-visit-type.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// xfail-test
22
//
3-
// This doesn't work quite yet. There's something wrong with the callback
4-
// type when dispatching through the visit_glue. Get a GEP crash on the
5-
// callee.
3+
// This doesn't work quite yet in check-fast mode. Not sure why. Crashes.
64

75
enum my_visitor = @{ mut types: [str] };
86

0 commit comments

Comments
 (0)