From eb678ff87f0cdbf523b26fe9255cff684b4091e5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Sat, 6 Sep 2014 15:23:55 -0700 Subject: librustc: Change the syntax of subslice matching to use postfix `..` instead of prefix `..`. This breaks code that looked like: match foo { [ first, ..middle, last ] => { ... } } Change this code to: match foo { [ first, middle.., last ] => { ... } } RFC #55. Closes #16967. [breaking-change] --- src/doc/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/doc/tutorial.md') diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md index 0db25c4090e..0e5a624b273 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -1707,7 +1707,7 @@ let score = match numbers { [] => 0, [a] => a * 10, [a, b] => a * 6 + b * 4, - [a, b, c, ..rest] => a * 5 + b * 3 + c * 2 + rest.len() as int + [a, b, c, rest..] => a * 5 + b * 3 + c * 2 + rest.len() as int }; ~~~~ -- cgit 1.4.1-3-g733a5