Skip to content

Commit db3bff3

Browse files
committed
---
yaml --- r: 23667 b: refs/heads/master c: 80c4f74 h: refs/heads/master i: 23665: 689b376 23663: bde60ee v: v3
1 parent ba90bdc commit db3bff3

File tree

14 files changed

+2419
-2420
lines changed

14 files changed

+2419
-2420
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d777e5133360876baa4213f81a33934f04768a0f
2+
refs/heads/master: 80c4f74c29ede062909db2b048b5b75820730994
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/doc/rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,14 +2211,14 @@ fn main() {
22112211
~~~~
22122212

22132213
Multiple match patterns may be joined with the `|` operator. A
2214-
range of values may be specified with `to`. For example:
2214+
range of values may be specified with `..`. For example:
22152215

22162216
~~~~
22172217
# let x = 2;
22182218
22192219
let message = match x {
22202220
0 | 1 => ~"not many",
2221-
2 to 9 => ~"a few",
2221+
2 .. 9 => ~"a few",
22222222
_ => ~"lots"
22232223
};
22242224
~~~~

trunk/src/libcore/char.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ pure fn is_digit(c: char) -> bool {
120120
*/
121121
pure fn to_digit(c: char, radix: uint) -> Option<uint> {
122122
let val = match c {
123-
'0' to '9' => c as uint - ('0' as uint),
124-
'a' to 'z' => c as uint + 10u - ('a' as uint),
125-
'A' to 'Z' => c as uint + 10u - ('A' as uint),
123+
'0' .. '9' => c as uint - ('0' as uint),
124+
'a' .. 'z' => c as uint + 10u - ('a' as uint),
125+
'A' .. 'Z' => c as uint + 10u - ('A' as uint),
126126
_ => return None
127127
};
128128
if val < radix { Some(val) }
@@ -171,7 +171,7 @@ fn escape_default(c: char) -> ~str {
171171
'\\' => ~"\\\\",
172172
'\'' => ~"\\'",
173173
'"' => ~"\\\"",
174-
'\x20' to '\x7e' => str::from_char(c),
174+
'\x20' .. '\x7e' => str::from_char(c),
175175
_ => escape_unicode(c)
176176
}
177177
}

trunk/src/libcore/float.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ fn from_str(num: &str) -> Option<float> {
263263

264264
//The string must start with one of the following characters.
265265
match str::char_at(num, 0u) {
266-
'-' | '+' | '0' to '9' | '.' => (),
266+
'-' | '+' | '0' .. '9' | '.' => (),
267267
_ => return None
268268
}
269269

@@ -286,7 +286,7 @@ fn from_str(num: &str) -> Option<float> {
286286
c = char_range.ch;
287287
pos = char_range.next;
288288
match c {
289-
'0' to '9' => {
289+
'0' .. '9' => {
290290
total = total * 10f;
291291
total += ((c as int) - ('0' as int)) as float;
292292
}

0 commit comments

Comments
 (0)