]> git.lizzy.rs Git - rust.git/commit
structured suggestion and rewording for `...` expression syntax error
authorZack M. Davis <code@zackmdavis.net>
Sat, 23 Jun 2018 23:49:09 +0000 (16:49 -0700)
committerZack M. Davis <code@zackmdavis.net>
Sun, 24 Jun 2018 05:57:37 +0000 (22:57 -0700)
commita417518173bae739d1aef50c6cf1a1e3bd4c4319
treeb9128702ccb5e0139d58f31c6d4a5797a300fb82
parent4650361fb627f7dd6b8d5c1cee8a7a12a050ba80
structured suggestion and rewording for `...` expression syntax error

Now that `..=` inclusive ranges are stabilized, people probably
shouldn't be using `...` even in patterns, even if it's still legal
there (see #51043). To avoid drawing attention to `...` being a real
thing, let's reword this message to just say "unexpected token" rather
"cannot be used in expressions".
src/libsyntax/parse/parser.rs
src/test/parse-fail/range_inclusive_dotdotdot.rs
src/test/ui/suggestions/dotdotdot-expr.rs [new file with mode: 0644]
src/test/ui/suggestions/dotdotdot-expr.stderr [new file with mode: 0644]