about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-07-08 18:49:46 -0700
committerbors <bors@rust-lang.org>2013-07-08 18:49:46 -0700
commita48ca3290df992fde2f74ccf5b9f4e36563af8da (patch)
tree816142177cf53d6185626aee592ef837b5e1d93a /src/rt
parent30c8aac677a754e0d4ebc16f261618f15d15a6e2 (diff)
parent0c6d02f391aa668b2ead91e8a4ed545475ac2c90 (diff)
downloadrust-a48ca3290df992fde2f74ccf5b9f4e36563af8da.tar.gz
rust-a48ca3290df992fde2f74ccf5b9f4e36563af8da.zip
auto merge of #7262 : nikomatsakis/rust/ref-bindings-in-irrefut-patterns, r=catamorphism
Correct treatment of irrefutable patterns. The old code was wrong in many, many ways. `ref` bindings didn't work, it sometimes copied when it should have moved, the borrow checker didn't even look at such patterns at all, we weren't consistent about preventing values with destructors from being pulled apart, etc.

Fixes #3224.
Fixes #3225.
Fixes #3255.
Fixes #6225.
Fixes #6386.

r? @catamorphism

Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/boxed_region.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/rt/boxed_region.cpp b/src/rt/boxed_region.cpp
index a49b52bffe1..012333b931e 100644
--- a/src/rt/boxed_region.cpp
+++ b/src/rt/boxed_region.cpp
@@ -39,10 +39,6 @@ rust_opaque_box *boxed_region::malloc(type_desc *td, size_t body_size) {
 rust_opaque_box *boxed_region::realloc(rust_opaque_box *box,
                                        size_t new_size) {
 
-    // We also get called on the unique-vec-in-managed-heap path.
-    assert(box->ref_count == 1 ||
-           box->ref_count == (size_t)(-2));
-
     size_t total_size = new_size + sizeof(rust_opaque_box);
     rust_opaque_box *new_box =
         (rust_opaque_box*)backing_region->realloc(box, total_size);