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]
This commit is contained in:
Patrick Walton 2014-09-26 21:13:20 -07:00
parent 38015eeb70
commit 416144b827
35 changed files with 161 additions and 164 deletions

View file

@ -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;