about summary refs log tree commit diff
path: root/src/liballoc/sync.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-28 11:11:04 +0200
committerGitHub <noreply@github.com>2019-07-28 11:11:04 +0200
commit75e23ff411d8466a513d9315b472e31d8f7fb2bc (patch)
tree3b93fc4df7148b5c22c0a0e036282c1a10092b2a /src/liballoc/sync.rs
parent9a239ef4ded03d155c72b68b5a2dd7aff013e141 (diff)
parentd33696fcb413e6768443626e78c5c4f23e413fc2 (diff)
downloadrust-75e23ff411d8466a513d9315b472e31d8f7fb2bc.tar.gz
rust-75e23ff411d8466a513d9315b472e31d8f7fb2bc.zip
Rollup merge of #62550 - Centril:rest-patterns, r=petrochenkov
Implement RFC 2707 + Parser recovery for range patterns

Implement https://github.com/rust-lang/rfcs/pull/2707.

- Add a new basic syntactic pattern form `ast::PatKind::Rest` (parsed as `..` or `DOTDOT`) and simplify `ast::PatKind::{Slice, Tuple, TupleStruct}` as a result.

- Lower `ast::PatKind::Rest` in combination with the aforementioned `PatKind` variants as well as `PatKind::Ident`. The HIR remains unchanged for now (may be advisable to make slight adjustments later).

- Refactor `parser.rs` wrt. parsing sequences and lists of things in the process.

- Add parser recovery for range patterns of form `X..`, `X..=`, `X...`, `..Y`, `..=Y`, and `...Y`.
   This should make it easy to actually support these patterns semantically later if we so desire.

cc https://github.com/rust-lang/rust/issues/62254

r? @petrochenkov
Diffstat (limited to 'src/liballoc/sync.rs')
0 files changed, 0 insertions, 0 deletions