about summary refs log tree commit diff
path: root/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs')
-rw-r--r--src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs b/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs
index 4d87bbf6c72..e7cbab41079 100644
--- a/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs
+++ b/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs
@@ -8,12 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+struct node_ {
+    mut a: ~cycle
+}
+
 enum cycle {
-    node({mut a: ~cycle}),
+    node(node_),
     empty
 }
 fn main() {
-    let x = ~node({mut a: ~empty});
+    let x = ~node(node_ {mut a: ~empty});
     // Create a cycle!
     match *x { //~ NOTE loan of immutable local variable granted here
       node(ref y) => {