diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_parser/src/grammar/types.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast | 38 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs | 1 |
3 files changed, 39 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/types.rs b/crates/ra_parser/src/grammar/types.rs index 63dd3774f..9e8e3bd97 100644 --- a/crates/ra_parser/src/grammar/types.rs +++ b/crates/ra_parser/src/grammar/types.rs | |||
@@ -217,6 +217,7 @@ pub(super) fn for_binder(p: &mut Parser) { | |||
217 | // test for_type | 217 | // test for_type |
218 | // type A = for<'a> fn() -> (); | 218 | // type A = for<'a> fn() -> (); |
219 | // type B = for<'a> unsafe extern "C" fn(&'a ()) -> (); | 219 | // type B = for<'a> unsafe extern "C" fn(&'a ()) -> (); |
220 | // type Obj = for<'a> PartialEq<&'a i32>; | ||
220 | pub(super) fn for_type(p: &mut Parser) { | 221 | pub(super) fn for_type(p: &mut Parser) { |
221 | assert!(p.at(T![for])); | 222 | assert!(p.at(T![for])); |
222 | let m = p.start(); | 223 | let m = p.start(); |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast index 26a80017a..b26ac2d36 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast | |||
@@ -1,4 +1,4 @@ | |||
1 | SOURCE_FILE@0..82 | 1 | SOURCE_FILE@0..121 |
2 | [email protected] | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
@@ -74,3 +74,39 @@ [email protected] | |||
74 | [email protected] ")" | 74 | [email protected] ")" |
75 | [email protected] ";" | 75 | [email protected] ";" |
76 | [email protected] "\n" | 76 | [email protected] "\n" |
77 | [email protected] | ||
78 | [email protected] "type" | ||
79 | [email protected] " " | ||
80 | [email protected] | ||
81 | [email protected] "Obj" | ||
82 | [email protected] " " | ||
83 | [email protected] "=" | ||
84 | [email protected] " " | ||
85 | [email protected] | ||
86 | [email protected] "for" | ||
87 | [email protected] | ||
88 | [email protected] "<" | ||
89 | [email protected] | ||
90 | [email protected] "\'a" | ||
91 | [email protected] ">" | ||
92 | [email protected] " " | ||
93 | [email protected] | ||
94 | [email protected] | ||
95 | [email protected] | ||
96 | [email protected] | ||
97 | [email protected] "PartialEq" | ||
98 | [email protected] | ||
99 | [email protected] "<" | ||
100 | [email protected] | ||
101 | [email protected] | ||
102 | [email protected] "&" | ||
103 | [email protected] "\'a" | ||
104 | [email protected] " " | ||
105 | [email protected] | ||
106 | [email protected] | ||
107 | [email protected] | ||
108 | [email protected] | ||
109 | [email protected] "i32" | ||
110 | [email protected] ">" | ||
111 | [email protected] ";" | ||
112 | [email protected] "\n" | ||
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 457e8744f..8ac7b9e10 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,2 +1,3 @@ | |||
1 | type A = for<'a> fn() -> (); | 1 | type A = for<'a> fn() -> (); |
2 | type B = for<'a> unsafe extern "C" fn(&'a ()) -> (); | 2 | type B = for<'a> unsafe extern "C" fn(&'a ()) -> (); |
3 | type Obj = for<'a> PartialEq<&'a i32>; | ||