diff options
author | Matthew Jasper <mjjasper1@gmail.com> | 2020-06-11 18:15:03 +0100 |
---|---|---|
committer | Matthew Jasper <mjjasper1@gmail.com> | 2020-06-11 18:15:03 +0100 |
commit | 8622e4cc1b79f5d23b8a2c6610d749f5b987ea7e (patch) | |
tree | d02ec5f590c2d35059e949c580bf7dd3cb053fcb /crates/ra_syntax/test_data | |
parent | 879693e63c19b474153473e11f96ab9c321739db (diff) |
Add example of old trait object syntax
Diffstat (limited to 'crates/ra_syntax/test_data')
-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 |
2 files changed, 38 insertions, 1 deletions
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 | 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 " " |
@@ -74,3 +74,39 @@ SOURCE_FILE@0..82 | |||
74 | R_PAREN@79..80 ")" | 74 | R_PAREN@79..80 ")" |
75 | SEMICOLON@80..81 ";" | 75 | SEMICOLON@80..81 ";" |
76 | WHITESPACE@81..82 "\n" | 76 | WHITESPACE@81..82 "\n" |
77 | TYPE_ALIAS_DEF@82..120 | ||
78 | TYPE_KW@82..86 "type" | ||
79 | WHITESPACE@86..87 " " | ||
80 | NAME@87..90 | ||
81 | IDENT@87..90 "Obj" | ||
82 | WHITESPACE@90..91 " " | ||
83 | EQ@91..92 "=" | ||
84 | WHITESPACE@92..93 " " | ||
85 | FOR_TYPE@93..119 | ||
86 | FOR_KW@93..96 "for" | ||
87 | TYPE_PARAM_LIST@96..100 | ||
88 | L_ANGLE@96..97 "<" | ||
89 | LIFETIME_PARAM@97..99 | ||
90 | LIFETIME@97..99 "\'a" | ||
91 | R_ANGLE@99..100 ">" | ||
92 | WHITESPACE@100..101 " " | ||
93 | PATH_TYPE@101..119 | ||
94 | PATH@101..119 | ||
95 | PATH_SEGMENT@101..119 | ||
96 | NAME_REF@101..110 | ||
97 | IDENT@101..110 "PartialEq" | ||
98 | TYPE_ARG_LIST@110..119 | ||
99 | L_ANGLE@110..111 "<" | ||
100 | TYPE_ARG@111..118 | ||
101 | REFERENCE_TYPE@111..118 | ||
102 | AMP@111..112 "&" | ||
103 | LIFETIME@112..114 "\'a" | ||
104 | WHITESPACE@114..115 " " | ||
105 | PATH_TYPE@115..118 | ||
106 | PATH@115..118 | ||
107 | PATH_SEGMENT@115..118 | ||
108 | NAME_REF@115..118 | ||
109 | IDENT@115..118 "i32" | ||
110 | R_ANGLE@118..119 ">" | ||
111 | SEMICOLON@119..120 ";" | ||
112 | WHITESPACE@120..121 "\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>; | ||