diff options
author | robojumper <[email protected]> | 2019-03-31 15:35:22 +0100 |
---|---|---|
committer | robojumper <[email protected]> | 2019-03-31 15:35:22 +0100 |
commit | d43dff43b4bb89306c418222df3b262a715c0fda (patch) | |
tree | f9a7c3eb9c1d8ac7caad5e88330a1cc5cd86b051 /crates/ra_syntax/tests/data/parser | |
parent | dec9bde10868b5e459535449476d17a6a0987b3e (diff) |
Async closure syntax
Diffstat (limited to 'crates/ra_syntax/tests/data/parser')
-rw-r--r-- | crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.txt | 56 |
2 files changed, 53 insertions, 6 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.rs index c20d29751..075717823 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.rs +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.rs | |||
@@ -3,4 +3,7 @@ fn foo() { | |||
3 | || -> i32 { 92 }; | 3 | || -> i32 { 92 }; |
4 | |x| x; | 4 | |x| x; |
5 | move |x: i32,| x; | 5 | move |x: i32,| x; |
6 | async || {}; | ||
7 | move || {}; | ||
8 | async move || {}; | ||
6 | } | 9 | } |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.txt index 98271c233..b885d239a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@[0; 79) | 1 | SOURCE_FILE@[0; 134) |
2 | FN_DEF@[0; 78) | 2 | FN_DEF@[0; 133) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) |
5 | NAME@[3; 6) | 5 | NAME@[3; 6) |
@@ -8,7 +8,7 @@ SOURCE_FILE@[0; 79) | |||
8 | L_PAREN@[6; 7) | 8 | L_PAREN@[6; 7) |
9 | R_PAREN@[7; 8) | 9 | R_PAREN@[7; 8) |
10 | WHITESPACE@[8; 9) | 10 | WHITESPACE@[8; 9) |
11 | BLOCK@[9; 78) | 11 | BLOCK@[9; 133) |
12 | L_CURLY@[9; 10) | 12 | L_CURLY@[9; 10) |
13 | WHITESPACE@[10; 15) | 13 | WHITESPACE@[10; 15) |
14 | EXPR_STMT@[15; 21) | 14 | EXPR_STMT@[15; 21) |
@@ -90,6 +90,50 @@ SOURCE_FILE@[0; 79) | |||
90 | NAME_REF@[74; 75) | 90 | NAME_REF@[74; 75) |
91 | IDENT@[74; 75) "x" | 91 | IDENT@[74; 75) "x" |
92 | SEMI@[75; 76) | 92 | SEMI@[75; 76) |
93 | WHITESPACE@[76; 77) | 93 | WHITESPACE@[76; 81) |
94 | R_CURLY@[77; 78) | 94 | EXPR_STMT@[81; 93) |
95 | WHITESPACE@[78; 79) | 95 | LAMBDA_EXPR@[81; 92) |
96 | ASYNC_KW@[81; 86) | ||
97 | WHITESPACE@[86; 87) | ||
98 | PARAM_LIST@[87; 89) | ||
99 | PIPE@[87; 88) | ||
100 | PIPE@[88; 89) | ||
101 | WHITESPACE@[89; 90) | ||
102 | BLOCK_EXPR@[90; 92) | ||
103 | BLOCK@[90; 92) | ||
104 | L_CURLY@[90; 91) | ||
105 | R_CURLY@[91; 92) | ||
106 | SEMI@[92; 93) | ||
107 | WHITESPACE@[93; 98) | ||
108 | EXPR_STMT@[98; 109) | ||
109 | LAMBDA_EXPR@[98; 108) | ||
110 | MOVE_KW@[98; 102) | ||
111 | WHITESPACE@[102; 103) | ||
112 | PARAM_LIST@[103; 105) | ||
113 | PIPE@[103; 104) | ||
114 | PIPE@[104; 105) | ||
115 | WHITESPACE@[105; 106) | ||
116 | BLOCK_EXPR@[106; 108) | ||
117 | BLOCK@[106; 108) | ||
118 | L_CURLY@[106; 107) | ||
119 | R_CURLY@[107; 108) | ||
120 | SEMI@[108; 109) | ||
121 | WHITESPACE@[109; 114) | ||
122 | EXPR_STMT@[114; 131) | ||
123 | LAMBDA_EXPR@[114; 130) | ||
124 | ASYNC_KW@[114; 119) | ||
125 | WHITESPACE@[119; 120) | ||
126 | MOVE_KW@[120; 124) | ||
127 | WHITESPACE@[124; 125) | ||
128 | PARAM_LIST@[125; 127) | ||
129 | PIPE@[125; 126) | ||
130 | PIPE@[126; 127) | ||
131 | WHITESPACE@[127; 128) | ||
132 | BLOCK_EXPR@[128; 130) | ||
133 | BLOCK@[128; 130) | ||
134 | L_CURLY@[128; 129) | ||
135 | R_CURLY@[129; 130) | ||
136 | SEMI@[130; 131) | ||
137 | WHITESPACE@[131; 132) | ||
138 | R_CURLY@[132; 133) | ||
139 | WHITESPACE@[133; 134) | ||