diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.rs b/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.rs deleted file mode 100644 index f035049d8..000000000 --- a/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.rs +++ /dev/null @@ -1,20 +0,0 @@ -struct Node_ { - a: Box<Cycle> -} - -enum Cycle { - Node(Node_), - Empty, -} - -fn main() { - let mut x: Box<_> = Box::new(Cycle::Node(Node_ {a: Box::new(Cycle::Empty)})); - - // Create a cycle! - match *x { - Cycle::Node(ref mut y) => { - y.a = x; //~ ERROR cannot move out of - } - Cycle::Empty => {} - }; -} |