aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-08-25 10:47:44 +0100
committerGitHub <[email protected]>2019-08-25 10:47:44 +0100
commit866b41ddd86cbe9c3e8d9cb2896477bab060a044 (patch)
tree2108601228076d62e833b732de52e182b8be4a0b /crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rs
parentfdece911fe8e2f3c22760ea22038a6d00cb70dfa (diff)
parentc93903e9c7f64be2edcae0dfe62d8390514658b1 (diff)
Merge #1733
1733: Parse arbitrarily complex `box` patterns. r=matklad a=ecstatic-morse This fully resolves the pattern part of #1412 by enabling the parsing of complex `box` patterns such as: ```rust let box Struct { box i, j: box Inner(box &x) } = todo!(); ``` This introduces a new `ast::BoxPat` (in the mold of `ast::RefPat`) that gets translated to `hir::Pat::Missing`. Co-authored-by: Dylan MacKenzie <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rs')
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rs b/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rs
new file mode 100644
index 000000000..9d458aa1e
--- /dev/null
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rs
@@ -0,0 +1,5 @@
1fn main() {
2 let box i = ();
3 let box Outer { box i, j: box Inner(box &x) } = ();
4 let box ref mut i = ();
5}