Skip to content

Commit cb123d2

Browse files
killerswanbrson
authored andcommitted
---
yaml --- r: 28282 b: refs/heads/try c: 9c8b0c6 h: refs/heads/master v: v3
1 parent 08d9101 commit cb123d2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: 100368ab86d4ac7fa306c1cebd3bf26c7d24bcda
5+
refs/heads/try: 9c8b0c60062a60f6f2022e5639147ac372b1d582
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/src/libstd/treemap.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* very naive algorithm, but it will probably be updated to be a
66
* red-black tree or something else.
77
*/
8+
#[forbid(deprecated_mode)];
9+
#[forbid(deprecated_pattern)];
810

911
use core::cmp::{Eq, Ord};
1012
use core::option::{Some, None};
@@ -30,7 +32,7 @@ enum tree_node<K, V> = {
3032
fn treemap<K, V>() -> treemap<K, V> { @mut None }
3133

3234
/// Insert a value into the map
33-
fn insert<K: copy Eq Ord, V: copy>(m: &mut tree_edge<K, V>, k: K, v: V) {
35+
fn insert<K: copy Eq Ord, V: copy>(m: &mut tree_edge<K, V>, +k: K, +v: V) {
3436
match copy *m {
3537
None => {
3638
*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) {
5254
}
5355

5456
/// Find a value based on the key
55-
fn find<K: copy Eq Ord, V: copy>(m: &const tree_edge<K, V>, k: K)
57+
fn find<K: copy Eq Ord, V: copy>(m: &const tree_edge<K, V>, +k: K)
5658
-> Option<V> {
5759
match copy *m {
5860
None => None,
@@ -124,7 +126,7 @@ mod tests {
124126
insert(m, 1, ());
125127

126128
let n = @mut 0;
127-
fn t(n: @mut int, &&k: int, &&_v: ()) {
129+
fn t(n: @mut int, +k: int, +_v: ()) {
128130
assert (*n == k); *n += 1;
129131
}
130132
traverse(m, |x,y| t(n, x, y));

0 commit comments

Comments
 (0)