Skip to content

Commit

Permalink
Workaround #3850
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Oct 25, 2012
1 parent 1a3a707 commit 8468c40
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/test/run-pass/string-self-append.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn main() {
while i > 0 {
log(error, str::len(a));
assert (str::len(a) == expected_len);
a += a;
a = a + a; // FIXME(#3387)---can't write a += a
i -= 1;
expected_len *= 2u;
}
Expand Down
6 changes: 5 additions & 1 deletion src/test/run-pass/vec-ivec-deadlock.rs
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
fn main() { let a = ~[1, 2, 3, 4, 5]; let mut b = ~[a, a]; b += b; }
fn main() {
let a = ~[1, 2, 3, 4, 5];
let mut b = ~[a, a];
b = b + b; // FIXME(#3387)---can't write b += b
}
6 changes: 3 additions & 3 deletions src/test/run-pass/vec-self-append.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extern mod std;
fn test_heap_to_heap() {
// a spills onto the heap
let mut a = ~[0, 1, 2, 3, 4];
a += a;
a = a + a; // FIXME(#3387)---can't write a += a
assert (vec::len(a) == 10u);
assert (a[0] == 0);
assert (a[1] == 1);
Expand All @@ -21,7 +21,7 @@ fn test_stack_to_heap() {
// a is entirely on the stack
let mut a = ~[0, 1, 2];
// a spills to the heap
a += a;
a = a + a; // FIXME(#3387)---can't write a += a
assert (vec::len(a) == 6u);
assert (a[0] == 0);
assert (a[1] == 1);
Expand All @@ -39,7 +39,7 @@ fn test_loop() {
while i > 0 {
log(error, vec::len(a));
assert (vec::len(a) == expected_len);
a += a;
a = a + a; // FIXME(#3387)---can't write a += a
i -= 1;
expected_len *= 2u;
}
Expand Down

0 comments on commit 8468c40

Please sign in to comment.