about summary refs log tree commit diff
path: root/src/libstd/treemap.rs
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-10-04 19:58:31 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-10-04 19:59:47 -0700
commit8fc60af441a1375ee73a0efe4524b54ff039e69a (patch)
treedf2e886ac825f6f95b35a72f2767f20f2ea72741 /src/libstd/treemap.rs
parentf5dfd9b3ce5dd6fbe567ba07e89c70a4db2c4cd4 (diff)
Remove by-copy mode from std, mostly
One instance remains in net_tcp due to a foreign fn. Lots of
instances remain in serialization.rs, but IIRC that is being removed.

I had to do unholy things to task-perf-word-count-generic to get it
to compile after demoding pipes. I may well have messed up its
performance, but it passes.
Diffstat (limited to 'src/libstd/treemap.rs')
-rw-r--r--src/libstd/treemap.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/treemap.rs b/src/libstd/treemap.rs
index 184dfd36279..8ab0dc7f2e7 100644
--- a/src/libstd/treemap.rs
+++ b/src/libstd/treemap.rs
@@ -5,7 +5,7 @@
  * very naive algorithm, but it will probably be updated to be a
  * red-black tree or something else.
  */
-#[warn(deprecated_mode)];
+#[forbid(deprecated_mode)];
 
 use core::cmp::{Eq, Ord};
 use core::option::{Some, None};
@@ -26,7 +26,7 @@ enum TreeNode<K, V> = {
 pub fn TreeMap<K, V>() -> TreeMap<K, V> { @mut None }
 
 /// Insert a value into the map
-pub fn insert<K: Copy Eq Ord, V: Copy>(m: &mut TreeEdge<K, V>, +k: K, +v: V) {
+pub fn insert<K: Copy Eq Ord, V: Copy>(m: &mut TreeEdge<K, V>, k: K, v: V) {
     match copy *m {
       None => {
         *m = Some(@TreeNode({key: k,
@@ -48,7 +48,7 @@ pub fn insert<K: Copy Eq Ord, V: Copy>(m: &mut TreeEdge<K, V>, +k: K, +v: V) {
 }
 
 /// Find a value based on the key
-pub fn find<K: Copy Eq Ord, V: Copy>(m: &const TreeEdge<K, V>, +k: K)
+pub fn find<K: Copy Eq Ord, V: Copy>(m: &const TreeEdge<K, V>, k: K)
                               -> Option<V> {
     match copy *m {
       None => None,
@@ -121,7 +121,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));