Skip to content

Commit e3b7e49

Browse files
committed
---
yaml --- r: 30323 b: refs/heads/incoming c: ef880f2 h: refs/heads/master i: 30321: fe93d87 30319: 45a65de v: v3
1 parent f937caf commit e3b7e49

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
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: 02b1c32e4d3c607da8b3a48640e597f089375765
9+
refs/heads/incoming: ef880f22450c4f7e455f431ff4603f90d443b545
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/doc/rust.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,9 +1027,9 @@ pure fn lt_42(x: int) -> bool {
10271027
Pure functions may call other pure functions:
10281028

10291029
~~~~{.xfail-test}
1030-
pure fn pure_length<T>(ls: list<T>) -> uint { /* ... */ }
1030+
pure fn pure_length<T>(ls: List<T>) -> uint { /* ... */ }
10311031
1032-
pure fn nonempty_list<T>(ls: list<T>) -> bool { pure_length(ls) > 0u }
1032+
pure fn nonempty_list<T>(ls: List<T>) -> bool { pure_length(ls) > 0u }
10331033
~~~~
10341034

10351035
*TODO:* should actually define referential transparency.
@@ -1055,14 +1055,14 @@ An example of a pure function that uses an unchecked block:
10551055
~~~~
10561056
# import std::list::*;
10571057
1058-
fn pure_foldl<T, U: copy>(ls: list<T>, u: U, f: fn(&&T, &&U) -> U) -> U {
1058+
fn pure_foldl<T, U: copy>(ls: List<T>, u: U, f: fn(&&T, &&U) -> U) -> U {
10591059
match ls {
1060-
nil => u,
1061-
cons(hd, tl) => f(hd, pure_foldl(*tl, f(hd, u), f))
1060+
Nil => u,
1061+
Cons(hd, tl) => f(hd, pure_foldl(*tl, f(hd, u), f))
10621062
}
10631063
}
10641064
1065-
pure fn pure_length<T>(ls: list<T>) -> uint {
1065+
pure fn pure_length<T>(ls: List<T>) -> uint {
10661066
fn count<T>(_t: T, &&u: uint) -> uint { u + 1u }
10671067
unchecked {
10681068
pure_foldl(ls, 0u, count)

0 commit comments

Comments
 (0)