Skip to content

Commit d1beb5a

Browse files
committed
---
yaml --- r: 30810 b: refs/heads/incoming c: 0ec267b h: refs/heads/master v: v3
1 parent 0365d2e commit d1beb5a

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 5424f21d5dd054e57113ca7814b813ba2d09fa15
9+
refs/heads/incoming: 0ec267b276d85786f4529e3d9717c6594bbf2f1d
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libstd/arena.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct Arena {
6363
unsafe {
6464
destroy_chunk(&self.head);
6565
for list::each(self.chunks) |chunk| {
66-
if !chunk.is_pod { destroy_chunk(&chunk); }
66+
if !chunk.is_pod { destroy_chunk(chunk); }
6767
}
6868
}
6969
}

branches/incoming/src/libstd/list.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fn find<T: Copy>(ls: @List<T>, f: fn((&T)) -> bool) -> Option<T> {
5959
/// Returns true if a list contains an element with the given value
6060
fn has<T: Copy Eq>(ls: @List<T>, +elt: T) -> bool {
6161
for each(ls) |e| {
62-
if e == elt { return true; }
62+
if *e == elt { return true; }
6363
}
6464
return false;
6565
}
@@ -135,11 +135,11 @@ fn iter<T>(l: @List<T>, f: fn((&T))) {
135135
}
136136

137137
/// Iterate over a list
138-
fn each<T>(l: @List<T>, f: fn(T) -> bool) {
138+
fn each<T>(l: @List<T>, f: fn((&T)) -> bool) {
139139
let mut cur = l;
140140
loop {
141141
cur = match *cur {
142-
Cons(hd, tl) => {
142+
Cons(ref hd, tl) => {
143143
if !f(hd) { return; }
144144
tl
145145
}

branches/incoming/src/libstd/treemap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ fn find<K: Copy Eq Ord, V: Copy>(m: &const TreeEdge<K, V>, +k: K)
7373
}
7474

7575
/// Visit all pairs in the map in order.
76-
fn traverse<K, V: Copy>(m: &const TreeEdge<K, V>, f: fn(K, V)) {
76+
fn traverse<K, V: Copy>(m: &const TreeEdge<K, V>, f: fn((&K), (&V))) {
7777
match copy *m {
7878
None => (),
7979
Some(node) => {
8080
traverse(&const node.left, f);
8181
// copy of value is req'd as f() requires an immutable ptr
82-
f(node.key, copy node.value);
82+
f(&node.key, &copy node.value);
8383
traverse(&const node.right, f);
8484
}
8585
}
@@ -130,7 +130,7 @@ mod tests {
130130
fn t(n: @mut int, +k: int, +_v: ()) {
131131
assert (*n == k); *n += 1;
132132
}
133-
traverse(m, |x,y| t(n, x, y));
133+
traverse(m, |x,y| t(n, *x, *y));
134134
}
135135

136136
#[test]

branches/incoming/src/rustc/middle/typeck/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl isr_alist: get_and_find_region {
181181

182182
fn find(br: ty::bound_region) -> Option<ty::region> {
183183
for list::each(self) |isr| {
184-
let (isr_br, isr_r) = isr;
184+
let (isr_br, isr_r) = *isr;
185185
if isr_br == br { return Some(isr_r); }
186186
}
187187
return None;

0 commit comments

Comments
 (0)