From 416144b8279fbffceacea6d0fd90e0fd1f8ce53d Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 26 Sep 2014 21:13:20 -0700 Subject: 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] --- src/test/compile-fail/refutable-pattern-errors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test/compile-fail/refutable-pattern-errors.rs') diff --git a/src/test/compile-fail/refutable-pattern-errors.rs b/src/test/compile-fail/refutable-pattern-errors.rs index 28533518a25..98d616ee3af 100644 --- a/src/test/compile-fail/refutable-pattern-errors.rs +++ b/src/test/compile-fail/refutable-pattern-errors.rs @@ -9,10 +9,10 @@ // except according to those terms. -fn func((1, (Some(1), 2..3)): (int, (Option, int))) { } +fn func((1, (Some(1), 2...3)): (int, (Option, 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 } -- cgit 1.4.1-3-g733a5