diff --git a/src/libstd/map.rs b/src/libstd/map.rs index 08ae0bd80c41f1d447948aa9576a5161556dbd9d..fc6d3ee52fc7fffddffde7780419f804952f4935 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -21,7 +21,7 @@ type hashmap = chained::t; -iface map { +iface map { #[doc = "Return the number of elements in the map"] fn size() -> uint; @@ -33,7 +33,7 @@ Returns true if the key did not already exist in the map "] - fn insert(K, V) -> bool; + fn insert(+K, +V) -> bool; #[doc = "Returns true if the map contains a value for the specified key"] fn contains_key(K) -> bool; @@ -96,7 +96,7 @@ enum search_result { found_after(@entry, @entry) } - impl private_methods for t { + impl private_methods for t { fn search_rem(k: K, h: uint, idx: uint, e_root: @entry) -> search_result { let mut e0 = e_root; @@ -174,7 +174,7 @@ fn each_entry(blk: fn(@entry) -> bool) { } } - impl hashmap of map for t { + impl hashmap of map for t { fn size() -> uint { self.count } fn contains_key(k: K) -> bool { @@ -185,7 +185,7 @@ fn contains_key(k: K) -> bool { } } - fn insert(k: K, v: V) -> bool { + fn insert(+k: K, +v: V) -> bool { let hash = self.hasher(k); alt self.search_tbl(k, hash) { not_found { @@ -249,7 +249,7 @@ fn remove(k: K) -> option { fn each(blk: fn(K,V) -> bool) { for self.each_entry { |entry| - if !blk(copy entry.key, copy entry.value) { break; } + if !blk(entry.key, copy entry.value) { break; } } } diff --git a/src/libstd/smallintmap.rs b/src/libstd/smallintmap.rs index ffe52c4131e652a72d21384e8056019b43632080..1abf54b438dd1afbbb60f0594d3636d0265d2c59 100644 --- a/src/libstd/smallintmap.rs +++ b/src/libstd/smallintmap.rs @@ -62,7 +62,7 @@ fn size() -> uint { } sz } - fn insert(&&key: uint, value: V) -> bool { + fn insert(+key: uint, +value: V) -> bool { let exists = contains_key(self, key); insert(self, key, value); ret !exists; diff --git a/src/test/run-pass/class-impl-parameterized-iface.rs b/src/test/run-pass/class-impl-parameterized-iface.rs index a8a08eabc932fe9e33ac4527a561285d536130bc..b7533bfe4267707e366415ffc32796ed5193f591 100644 --- a/src/test/run-pass/class-impl-parameterized-iface.rs +++ b/src/test/run-pass/class-impl-parameterized-iface.rs @@ -36,7 +36,7 @@ fn eat() -> bool { } fn size() -> uint { self.meows as uint } - fn insert(&&k: int, &&v: bool) -> bool { + fn insert(+k: int, +v: bool) -> bool { if v { self.meows += k; } else { self.meows -= k; }; true } diff --git a/src/test/run-pass/class-impl-very-parameterized-iface.rs b/src/test/run-pass/class-impl-very-parameterized-iface.rs index 74d8f921186cfc28ce9a962a4963d5102dfe7967..89674fecfa49535f6c66499de5d3422431dd4b81 100644 --- a/src/test/run-pass/class-impl-very-parameterized-iface.rs +++ b/src/test/run-pass/class-impl-very-parameterized-iface.rs @@ -41,7 +41,7 @@ fn eat() -> bool { } fn size() -> uint { self.meows as uint } - fn insert(&&k: int, &&_v: T) -> bool { + fn insert(+k: int, +_v: T) -> bool { self.meows += k; true }