about summary refs log tree commit diff
path: root/src/libstd/map.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/map.rs')
-rw-r--r--src/libstd/map.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/libstd/map.rs b/src/libstd/map.rs
index cc42c562376..765d40339d3 100644
--- a/src/libstd/map.rs
+++ b/src/libstd/map.rs
@@ -1,6 +1,5 @@
 //! A map type
-
-// tjc: forbid deprecated modes again after snap
+#[forbid(deprecated_mode)];
 
 use io::WriterUtil;
 use to_str::ToStr;
@@ -28,7 +27,7 @@ pub trait Map<K:Eq IterBytes Hash Copy, V: Copy> {
      *
      * Returns true if the key did not already exist in the map
      */
-    fn insert(v: K, +v: V) -> bool;
+    fn insert(v: K, v: V) -> bool;
 
     /// Returns true if the map contains a value for the specified key
     fn contains_key(key: K) -> bool;
@@ -59,7 +58,7 @@ pub trait Map<K:Eq IterBytes Hash Copy, V: Copy> {
     fn clear();
 
     /// Iterate over all the key/value pairs in the map by value
-    pure fn each(fn(key: K, +value: V) -> bool);
+    pure fn each(fn(key: K, value: V) -> bool);
 
     /// Iterate over all the keys in the map by value
     pure fn each_key(fn(key: K) -> bool);
@@ -213,7 +212,7 @@ pub mod chained {
             }
         }
 
-        fn insert(k: K, +v: V) -> bool {
+        fn insert(k: K, v: V) -> bool {
             let hash = k.hash_keyed(0,0) as uint;
             match self.search_tbl(&k, hash) {
               NotFound => {
@@ -294,7 +293,7 @@ pub mod chained {
             self.chains = chains(initial_capacity);
         }
 
-        pure fn each(blk: fn(key: K, +value: V) -> bool) {
+        pure fn each(blk: fn(key: K, value: V) -> bool) {
             self.each_ref(|k, v| blk(*k, *v))
         }
 
@@ -348,7 +347,7 @@ pub mod chained {
     }
 
     impl<K:Eq IterBytes Hash Copy, V: Copy> T<K, V>: ops::Index<K, V> {
-        pure fn index(+k: K) -> V {
+        pure fn index(k: K) -> V {
             unsafe {
                 self.get(k)
             }
@@ -382,7 +381,7 @@ pub fn set_add<K:Eq IterBytes Hash Const Copy>(set: Set<K>, key: K) -> bool {
 }
 
 /// Convert a set into a vector.
-pub fn vec_from_set<T:Eq IterBytes Hash Copy>(s: Set<T>) -> ~[T] {
+pub pure fn vec_from_set<T:Eq IterBytes Hash Copy>(s: Set<T>) -> ~[T] {
     do vec::build_sized(s.size()) |push| {
         for s.each_key() |k| {
             push(k);
@@ -459,7 +458,7 @@ impl<K: Eq IterBytes Hash Copy, V: Copy> @Mut<LinearMap<K, V>>:
         }
     }
 
-    pure fn each(op: fn(key: K, +value: V) -> bool) {
+    pure fn each(op: fn(key: K, value: V) -> bool) {
         unsafe {
             do self.borrow_imm |p| {
                 p.each(|k, v| op(*k, *v))