about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-19 18:14:30 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-19 18:14:30 -0700
commit9173508aa461cf7789d3620947ff0ecd3a174a11 (patch)
tree7f71c495556642839c3fddce0c9d7d5d5fd5b1f6 /src/libstd
parentebd3203eaf12551ad7ab936db1615d59a4fedaae (diff)
std: Demode arena
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/arena.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libstd/arena.rs b/src/libstd/arena.rs
index 37fdf4189c9..10fdec44094 100644
--- a/src/libstd/arena.rs
+++ b/src/libstd/arena.rs
@@ -22,6 +22,9 @@
 // overhead when initializing plain-old-data and means we don't need
 // to waste time running the destructors of POD.
 
+#[forbid(deprecated_mode)];
+#[forbid(deprecated_pattern)];
+
 export Arena, arena_with_size;
 
 use list::{List, Cons, Nil};
@@ -56,9 +59,9 @@ struct Arena {
     priv mut chunks: @List<Chunk>,
     drop {
         unsafe {
-            destroy_chunk(self.head);
+            destroy_chunk(&self.head);
             for list::each(self.chunks) |chunk| {
-                if !chunk.is_pod { destroy_chunk(chunk); }
+                if !chunk.is_pod { destroy_chunk(&chunk); }
             }
         }
     }
@@ -87,7 +90,7 @@ fn round_up_to(base: uint, align: uint) -> uint {
 
 // Walk down a chunk, running the destructors for any objects stored
 // in it.
-unsafe fn destroy_chunk(chunk: Chunk) {
+unsafe fn destroy_chunk(chunk: &Chunk) {
     let mut idx = 0;
     let buf = vec::raw::to_ptr(chunk.data);
     let fill = chunk.fill;