Skip to content

Commit b9a5a55

Browse files
committed
---
yaml --- r: 60914 b: refs/heads/auto c: 64759c9 h: refs/heads/master v: v3
1 parent b5f3d34 commit b9a5a55

File tree

3 files changed

+11
-22
lines changed

3 files changed

+11
-22
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: c5d7a77a533d33a4681f629744f0d0695c5e08b7
17+
refs/heads/auto: 64759c9f25993d255c7ced4edecdd14a75e149b0
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/librustc/middle/trans/expr.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,8 +727,14 @@ fn trans_def_dps_unadjusted(bcx: block, ref_expr: @ast::expr,
727727
}
728728
}
729729
ast::def_struct(*) => {
730-
// Nothing to do here.
731-
// FIXME #6572: May not be true in the case of classes with destructors.
730+
let ty = expr_ty(bcx, ref_expr);
731+
match ty::get(ty).sty {
732+
ty::ty_struct(did, _) if ty::has_dtor(ccx.tcx, did) => {
733+
let repr = adt::represent_type(ccx, ty);
734+
adt::trans_start_init(bcx, repr, lldest, 0);
735+
}
736+
_ => {}
737+
}
732738
return bcx;
733739
}
734740
_ => {

branches/auto/src/libstd/vec.rs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ pub fn each<'r,T>(v: &'r [T], f: &fn(&'r T) -> bool) -> bool {
15321532
}
15331533
broke = n > 0;
15341534
}
1535-
return !broke;
1535+
return true;
15361536
}
15371537

15381538
/// Like `each()`, but for the case where you have
@@ -1554,7 +1554,7 @@ pub fn each_mut<'r,T>(v: &'r mut [T], f: &fn(elem: &'r mut T) -> bool) -> bool {
15541554
}
15551555
broke = n > 0;
15561556
}
1557-
return !broke;
1557+
return broke;
15581558
}
15591559

15601560
/// Like `each()`, but for the case where you have a vector that *may or may
@@ -3566,23 +3566,6 @@ mod tests {
35663566
}
35673567
}
35683568

3569-
#[test]
3570-
fn test_each_ret_len0() {
3571-
let mut a0 : [int, .. 0] = [];
3572-
assert_eq!(each(a0, |_p| fail!()), true);
3573-
assert_eq!(each_mut(a0, |_p| fail!()), true);
3574-
}
3575-
3576-
#[test]
3577-
fn test_each_ret_len1() {
3578-
let mut a1 = [17];
3579-
assert_eq!(each(a1, |_p| true), true);
3580-
assert_eq!(each_mut(a1, |_p| true), true);
3581-
assert_eq!(each(a1, |_p| false), false);
3582-
assert_eq!(each_mut(a1, |_p| false), false);
3583-
}
3584-
3585-
35863569
#[test]
35873570
fn test_each_permutation() {
35883571
let mut results: ~[~[int]];

0 commit comments

Comments
 (0)