File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ fn foo(#[attr] x: i32, #[attr] x: i64) {}
89
89
90
90
fn accumulate(self) -> Machine<{State::Accumulate}> {}
91
91
92
+ fn foo(bar: impl for<'a> Baz<Quux<'a>>) {}
93
+
92
94
--------------------------------------------------------------------------------
93
95
94
96
(source_file
@@ -200,6 +202,24 @@ fn accumulate(self) -> Machine<{State::Accumulate}> {}
200
202
(scoped_identifier
201
203
path: (identifier)
202
204
name: (identifier)))))
205
+ body: (block))
206
+ (function_item
207
+ name: (identifier)
208
+ parameters: (parameters
209
+ (parameter
210
+ pattern: (identifier)
211
+ type: (abstract_type
212
+ (type_parameters
213
+ (lifetime
214
+ (identifier)))
215
+ trait: (generic_type
216
+ type: (type_identifier)
217
+ type_arguments: (type_arguments
218
+ (generic_type
219
+ type: (type_identifier)
220
+ type_arguments: (type_arguments
221
+ (lifetime
222
+ (identifier)))))))))
203
223
body: (block)))
204
224
205
225
================================================================================
Original file line number Diff line number Diff line change @@ -809,6 +809,7 @@ module.exports = grammar({
809
809
810
810
abstract_type : $ => seq (
811
811
'impl' ,
812
+ optional ( seq ( 'for' , $ . type_parameters ) ) ,
812
813
field ( 'trait' , choice (
813
814
$ . _type_identifier ,
814
815
$ . scoped_type_identifier ,
You can’t perform that action at this time.
0 commit comments