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

@@ -9,10 +9,10 @@
// except according to those terms.
fn func((1, (Some(1), 2..3)): (int, (Option<int>, int))) { }
fn func((1, (Some(1), 2...3)): (int, (Option<int>, int))) { }
//~^ ERROR refutable pattern in function argument: `(_, _)` not covered
fn main() {
let (1i, (Some(1i), 2i..3i)) = (1i, (None, 2i));
let (1i, (Some(1i), 2i...3i)) = (1i, (None, 2i));
//~^ ERROR refutable pattern in local binding: `(_, _)` not covered
}