diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-08-14 16:10:31 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-08-14 16:10:31 +0100 |
commit | 19e0d7d596015599fd705eecfe6f695aabc8632d (patch) | |
tree | 531ca24c725da983739477a146db7c823dae073b /crates/ra_syntax/test_data/parser/inline/ok | |
parent | 978e3e384b045ea72ba952e7f94a2a4c82297e66 (diff) | |
parent | 8222a1fddfe73dab5e00437efeffa7d95db0b6be (diff) |
Merge #1676
1676: Fix for<'lifetime> for types specified by path r=matklad a=eupn
Fixes #1467.
Co-authored-by: Evgenii P <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline/ok')
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.txt | 83 |
2 files changed, 83 insertions, 1 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs index 7cde5c532..d6774d438 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs | |||
@@ -1,3 +1,4 @@ | |||
1 | type A = for<'a> fn() -> (); | 1 | type A = for<'a> fn() -> (); |
2 | fn foo<T>(_t: &T) where for<'a> &'a T: Iterator {} | 2 | fn foo<T>(_t: &T) where for<'a> &'a T: Iterator {} |
3 | fn bar<T>(_t: &T) where for<'a> &'a mut T: Iterator {} | 3 | fn bar<T>(_t: &T) where for<'a> &'a mut T: Iterator {} |
4 | fn baz<T>(_t: &T) where for<'a> <&'a T as Baz>::Foo: Iterator {} | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.txt index 599cf9452..c12ce4ddb 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | SOURCE_FILE@[0; 135) | 1 | SOURCE_FILE@[0; 200) |
2 | TYPE_ALIAS_DEF@[0; 28) | 2 | TYPE_ALIAS_DEF@[0; 28) |
3 | TYPE_KW@[0; 4) "type" | 3 | TYPE_KW@[0; 4) "type" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
@@ -157,3 +157,84 @@ SOURCE_FILE@[0; 135) | |||
157 | L_CURLY@[132; 133) "{" | 157 | L_CURLY@[132; 133) "{" |
158 | R_CURLY@[133; 134) "}" | 158 | R_CURLY@[133; 134) "}" |
159 | WHITESPACE@[134; 135) "\n" | 159 | WHITESPACE@[134; 135) "\n" |
160 | FN_DEF@[135; 199) | ||
161 | FN_KW@[135; 137) "fn" | ||
162 | WHITESPACE@[137; 138) " " | ||
163 | NAME@[138; 141) | ||
164 | IDENT@[138; 141) "baz" | ||
165 | TYPE_PARAM_LIST@[141; 144) | ||
166 | L_ANGLE@[141; 142) "<" | ||
167 | TYPE_PARAM@[142; 143) | ||
168 | NAME@[142; 143) | ||
169 | IDENT@[142; 143) "T" | ||
170 | R_ANGLE@[143; 144) ">" | ||
171 | PARAM_LIST@[144; 152) | ||
172 | L_PAREN@[144; 145) "(" | ||
173 | PARAM@[145; 151) | ||
174 | BIND_PAT@[145; 147) | ||
175 | NAME@[145; 147) | ||
176 | IDENT@[145; 147) "_t" | ||
177 | COLON@[147; 148) ":" | ||
178 | WHITESPACE@[148; 149) " " | ||
179 | REFERENCE_TYPE@[149; 151) | ||
180 | AMP@[149; 150) "&" | ||
181 | PATH_TYPE@[150; 151) | ||
182 | PATH@[150; 151) | ||
183 | PATH_SEGMENT@[150; 151) | ||
184 | NAME_REF@[150; 151) | ||
185 | IDENT@[150; 151) "T" | ||
186 | R_PAREN@[151; 152) ")" | ||
187 | WHITESPACE@[152; 153) " " | ||
188 | WHERE_CLAUSE@[153; 196) | ||
189 | WHERE_KW@[153; 158) "where" | ||
190 | WHITESPACE@[158; 159) " " | ||
191 | WHERE_PRED@[159; 196) | ||
192 | FOR_TYPE@[159; 186) | ||
193 | FOR_KW@[159; 162) "for" | ||
194 | TYPE_PARAM_LIST@[162; 166) | ||
195 | L_ANGLE@[162; 163) "<" | ||
196 | LIFETIME_PARAM@[163; 165) | ||
197 | LIFETIME@[163; 165) "\'a" | ||
198 | R_ANGLE@[165; 166) ">" | ||
199 | WHITESPACE@[166; 167) " " | ||
200 | PATH_TYPE@[167; 186) | ||
201 | PATH@[167; 186) | ||
202 | PATH@[167; 181) | ||
203 | PATH_SEGMENT@[167; 181) | ||
204 | L_ANGLE@[167; 168) "<" | ||
205 | REFERENCE_TYPE@[168; 173) | ||
206 | AMP@[168; 169) "&" | ||
207 | LIFETIME@[169; 171) "\'a" | ||
208 | WHITESPACE@[171; 172) " " | ||
209 | PATH_TYPE@[172; 173) | ||
210 | PATH@[172; 173) | ||
211 | PATH_SEGMENT@[172; 173) | ||
212 | NAME_REF@[172; 173) | ||
213 | IDENT@[172; 173) "T" | ||
214 | WHITESPACE@[173; 174) " " | ||
215 | AS_KW@[174; 176) "as" | ||
216 | WHITESPACE@[176; 177) " " | ||
217 | PATH_TYPE@[177; 180) | ||
218 | PATH@[177; 180) | ||
219 | PATH_SEGMENT@[177; 180) | ||
220 | NAME_REF@[177; 180) | ||
221 | IDENT@[177; 180) "Baz" | ||
222 | R_ANGLE@[180; 181) ">" | ||
223 | COLONCOLON@[181; 183) "::" | ||
224 | PATH_SEGMENT@[183; 186) | ||
225 | NAME_REF@[183; 186) | ||
226 | IDENT@[183; 186) "Foo" | ||
227 | COLON@[186; 187) ":" | ||
228 | WHITESPACE@[187; 188) " " | ||
229 | TYPE_BOUND_LIST@[188; 196) | ||
230 | TYPE_BOUND@[188; 196) | ||
231 | PATH_TYPE@[188; 196) | ||
232 | PATH@[188; 196) | ||
233 | PATH_SEGMENT@[188; 196) | ||
234 | NAME_REF@[188; 196) | ||
235 | IDENT@[188; 196) "Iterator" | ||
236 | WHITESPACE@[196; 197) " " | ||
237 | BLOCK@[197; 199) | ||
238 | L_CURLY@[197; 198) "{" | ||
239 | R_CURLY@[198; 199) "}" | ||
240 | WHITESPACE@[199; 200) "\n" | ||