aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/test_data/parser/ok
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-15 08:10:16 +0100
committerGitHub <[email protected]>2019-09-15 08:10:16 +0100
commit2d79a1ad83cc39075c7c9e3230973013c8c58b17 (patch)
treee394007f715f8586c737db8f20f2d8f16f8913af /crates/ra_syntax/test_data/parser/ok
parentbcdba777bdc43762cff73ac3ded4ae737a503692 (diff)
parent0956323bb7b728da6bff4ad7241a542f4bb4e8e6 (diff)
Merge #1848
1848: Parse `..` as a full pattern r=matklad a=ecstatic-morse Resolves #1479. This PR implements [RFC 2707](https://github.com/rust-lang/rfcs/pull/2707) in the parser. It introduces a new `DotDotPat` AST node modeled on `PlaceholderPat` and changes the parsing of tuple and slice patterns to conform to the RFC. Notably, this PR does *not* change the resulting AST when `..` appears in a struct pattern (e.g. `Struct { a, b: c, .. }`). I *think* this is the behavior mandated by RFC 2707, but someone should confirm this. Co-authored-by: Dylan MacKenzie <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/ok')
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt
index c18e3c329..3326ab2ae 100644
--- a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt
@@ -1656,7 +1656,8 @@ SOURCE_FILE@[0; 3813)
1656 PARAM@[2952; 2962) 1656 PARAM@[2952; 2962)
1657 TUPLE_PAT@[2952; 2956) 1657 TUPLE_PAT@[2952; 2956)
1658 L_PAREN@[2952; 2953) "(" 1658 L_PAREN@[2952; 2953) "("
1659 DOTDOT@[2953; 2955) ".." 1659 DOT_DOT_PAT@[2953; 2955)
1660 DOTDOT@[2953; 2955) ".."
1660 R_PAREN@[2955; 2956) ")" 1661 R_PAREN@[2955; 2956) ")"
1661 COLON@[2956; 2957) ":" 1662 COLON@[2956; 2957) ":"
1662 TUPLE_TYPE@[2957; 2962) 1663 TUPLE_TYPE@[2957; 2962)