diff options
| author | Benjamin Adamson <adamson.benjamin@gmail.com> | 2014-04-02 20:06:55 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-04-03 13:43:09 -0700 |
| commit | 2ae292473e2b96ea8429dff5f2f3581bc026582c (patch) | |
| tree | 37e7707e363e2afa55987beebd59a60348ae0641 /src | |
| parent | b4f7b6d6729e3d255477833b05e0fd0b58c9ee34 (diff) | |
| download | rust-2ae292473e2b96ea8429dff5f2f3581bc026582c.tar.gz rust-2ae292473e2b96ea8429dff5f2f3581bc026582c.zip | |
Removed managed boxes from libarena.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libarena/lib.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs index 2099d3c01c4..4f8e5ee3a29 100644 --- a/src/libarena/lib.rs +++ b/src/libarena/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -23,8 +23,6 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://static.rust-lang.org/doc/master")] #![allow(missing_doc)] -#![feature(managed_boxes)] - #![allow(visible_private_types)] // NOTE: remove after a stage0 snap extern crate collections; @@ -301,7 +299,7 @@ fn test_arena_destructors() { for i in range(0u, 10) { // Arena allocate something with drop glue to make sure it // doesn't leak. - arena.alloc(|| @i); + arena.alloc(|| Rc::new(i)); // Allocate something with funny size and alignment, to keep // things interesting. arena.alloc(|| [0u8, 1u8, 2u8]); @@ -316,13 +314,13 @@ fn test_arena_destructors_fail() { for i in range(0u, 10) { // Arena allocate something with drop glue to make sure it // doesn't leak. - arena.alloc(|| { @i }); + arena.alloc(|| { Rc::new(i) }); // Allocate something with funny size and alignment, to keep // things interesting. arena.alloc(|| { [0u8, 1u8, 2u8] }); } // Now, fail while allocating - arena.alloc::<@int>(|| { + arena.alloc::<Rc<int>>(|| { // Now fail. fail!(); }); |
