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/test/compile-fail/refutable-pattern-errors.rs | |
| 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/test/compile-fail/refutable-pattern-errors.rs')
| -rw-r--r-- | src/test/compile-fail/refutable-pattern-errors.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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>, 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 } |
