diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-09-26 21:13:20 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-09-30 09:11:26 -0700 |
| commit | 416144b8279fbffceacea6d0fd90e0fd1f8ce53d (patch) | |
| tree | 0f7f628dd1388f378ac4836e32359b18a7297212 /src/libstd/num | |
| parent | 38015eeb7010e5954a1bc60fddc1214a5f359627 (diff) | |
| download | rust-416144b8279fbffceacea6d0fd90e0fd1f8ce53d.tar.gz rust-416144b8279fbffceacea6d0fd90e0fd1f8ce53d.zip | |
librustc: Forbid `..` in range patterns.
This breaks code that looks like:
match foo {
1..3 => { ... }
}
Instead, write:
match foo {
1...3 => { ... }
}
Closes #17295.
[breaking-change]
Diffstat (limited to 'src/libstd/num')
| -rw-r--r-- | src/libstd/num/strconv.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index 407c8ea61d9..b15f334e233 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -199,8 +199,8 @@ pub fn int_to_str_bytes_common<T: Int>(num: T, radix: uint, sign: SignFormat, f: current_digit_signed }; buf[cur] = match current_digit.to_u8().unwrap() { - i @ 0..9 => b'0' + i, - i => b'a' + (i - 10), + i @ 0...9 => b'0' + i, + i => b'a' + (i - 10), }; cur += 1; |
