about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-09-02 18:09:48 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-04 11:30:49 -0700
commit9c8b0c60062a60f6f2022e5639147ac372b1d582 (patch)
treeb43eefd30960317ee95989bc7070c12bdebcb297 /src/libstd
parent100368ab86d4ac7fa306c1cebd3bf26c7d24bcda (diff)
Demode treemap.rs
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/treemap.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/treemap.rs b/src/libstd/treemap.rs
index 8eee59e029c..3d8a5dc86fa 100644
--- a/src/libstd/treemap.rs
+++ b/src/libstd/treemap.rs
@@ -5,6 +5,8 @@
  * very naive algorithm, but it will probably be updated to be a
  * red-black tree or something else.
  */
+#[forbid(deprecated_mode)];
+#[forbid(deprecated_pattern)];
 
 use core::cmp::{Eq, Ord};
 use core::option::{Some, None};
@@ -30,7 +32,7 @@ enum tree_node<K, V> = {
 fn treemap<K, V>() -> treemap<K, V> { @mut None }
 
 /// Insert a value into the map
-fn insert<K: copy Eq Ord, V: copy>(m: &mut tree_edge<K, V>, k: K, v: V) {
+fn insert<K: copy Eq Ord, V: copy>(m: &mut tree_edge<K, V>, +k: K, +v: V) {
     match copy *m {
       None => {
         *m = Some(@tree_node({key: k,
@@ -52,7 +54,7 @@ fn insert<K: copy Eq Ord, V: copy>(m: &mut tree_edge<K, V>, k: K, v: V) {
 }
 
 /// Find a value based on the key
-fn find<K: copy Eq Ord, V: copy>(m: &const tree_edge<K, V>, k: K)
+fn find<K: copy Eq Ord, V: copy>(m: &const tree_edge<K, V>, +k: K)
                               -> Option<V> {
     match copy *m {
       None => None,
@@ -124,7 +126,7 @@ mod tests {
         insert(m, 1, ());
 
         let n = @mut 0;
-        fn t(n: @mut int, &&k: int, &&_v: ()) {
+        fn t(n: @mut int, +k: int, +_v: ()) {
             assert (*n == k); *n += 1;
         }
         traverse(m, |x,y| t(n, x, y));