diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-09-06 15:23:55 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-09-08 16:12:13 -0700 |
| commit | eb678ff87f0cdbf523b26fe9255cff684b4091e5 (patch) | |
| tree | 9fb3745051a57fd5f73d6d50aabf07ce9d2f6ea4 /src/doc/tutorial.md | |
| parent | 6f34760e4173dda94162502153fe4c5a2a96fc9d (diff) | |
| download | rust-eb678ff87f0cdbf523b26fe9255cff684b4091e5.tar.gz rust-eb678ff87f0cdbf523b26fe9255cff684b4091e5.zip | |
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]
Diffstat (limited to 'src/doc/tutorial.md')
| -rw-r--r-- | src/doc/tutorial.md | 2 |
1 files changed, 1 insertions, 1 deletions
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 }; ~~~~ |
