about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-04-24 14:16:50 -0700
committerBrian Anderson <banderson@mozilla.com>2012-04-24 14:55:16 -0700
commite7dbf42214c5dfe39b8fd6896171aaa8feee7582 (patch)
tree461537fc368efdd0c047635a70c33b5e7e4fa68d /src/test
parent5437a045fc653eea0efafb28f0e13b12f0bfa3d5 (diff)
downloadrust-e7dbf42214c5dfe39b8fd6896171aaa8feee7582.tar.gz
rust-e7dbf42214c5dfe39b8fd6896171aaa8feee7582.zip
rustc: Fix type_need_unwind_cleanup. Closes #2272
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/class-implements-int.rs7
-rw-r--r--src/test/compile-fail/infinite-instantiation.rs2
-rw-r--r--src/test/run-fail/issue-2272.rs12
3 files changed, 12 insertions, 9 deletions
diff --git a/src/test/compile-fail/class-implements-int.rs b/src/test/compile-fail/class-implements-int.rs
index 70eca5e0742..7a2a7ad4f94 100644
--- a/src/test/compile-fail/class-implements-int.rs
+++ b/src/test/compile-fail/class-implements-int.rs
@@ -1,10 +1,3 @@
-// xfail-test
-/*
-  tjc: currently this results in a memory leak after a call to
-  span_fatal in typeck. I think it's the same issue as #2272, because
-  if I make type_needs_unwind_cleanup always return true, the test passes.
-  FIXME: Un-xfail this when #2272 is fixed.
- */
 class cat implements int { //! ERROR can only implement interface types
   let meows: uint;
   new(in_x : uint) { self.meows = in_x; }
diff --git a/src/test/compile-fail/infinite-instantiation.rs b/src/test/compile-fail/infinite-instantiation.rs
index 5bf485ba535..fa49f605306 100644
--- a/src/test/compile-fail/infinite-instantiation.rs
+++ b/src/test/compile-fail/infinite-instantiation.rs
@@ -1,7 +1,5 @@
 // error-pattern: overly deep expansion
 // issue 2258
-// This is currently exposing a memory leak, and xfailed for that reason
-// xfail-test
 
 iface to_opt {
     fn to_option() -> option<self>;
diff --git a/src/test/run-fail/issue-2272.rs b/src/test/run-fail/issue-2272.rs
new file mode 100644
index 00000000000..5aa1f4a92f6
--- /dev/null
+++ b/src/test/run-fail/issue-2272.rs
@@ -0,0 +1,12 @@
+// error-pattern:explicit failure
+// Issue #2272 - unwind this without leaking the unique pointer
+
+fn main() {
+    let _x = {
+        y: {
+            z: @0
+        },
+        a: ~0
+    };
+    fail;
+}
\ No newline at end of file