diff options
Diffstat (limited to 'crates/ra_syntax/tests/data/parser/inline/ok')
20 files changed, 433 insertions, 202 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt index 7c9e1e621..39cadffbc 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt | |||
@@ -18,11 +18,13 @@ SOURCE_FILE@[0; 83) | |||
18 | IDENT@[18; 19) "A" | 18 | IDENT@[18; 19) "A" |
19 | COLON@[19; 20) | 19 | COLON@[19; 20) |
20 | WHITESPACE@[20; 21) | 20 | WHITESPACE@[20; 21) |
21 | PATH_TYPE@[21; 26) | 21 | TYPE_BOUND_LIST@[21; 26) |
22 | PATH@[21; 26) | 22 | TYPE_BOUND@[21; 26) |
23 | PATH_SEGMENT@[21; 26) | 23 | PATH_TYPE@[21; 26) |
24 | NAME_REF@[21; 26) | 24 | PATH@[21; 26) |
25 | IDENT@[21; 26) "Clone" | 25 | PATH_SEGMENT@[21; 26) |
26 | NAME_REF@[21; 26) | ||
27 | IDENT@[21; 26) "Clone" | ||
26 | SEMI@[26; 27) | 28 | SEMI@[26; 27) |
27 | WHITESPACE@[27; 32) | 29 | WHITESPACE@[27; 32) |
28 | CONST_DEF@[32; 45) | 30 | CONST_DEF@[32; 45) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt index 41420ea92..8bc29564e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt | |||
@@ -33,24 +33,26 @@ SOURCE_FILE@[0; 49) | |||
33 | IDENT@[30; 31) "F" | 33 | IDENT@[30; 31) "F" |
34 | COLON@[31; 32) | 34 | COLON@[31; 32) |
35 | WHITESPACE@[32; 33) | 35 | WHITESPACE@[32; 33) |
36 | PATH_TYPE@[33; 44) | 36 | TYPE_BOUND_LIST@[33; 44) |
37 | PATH@[33; 44) | 37 | TYPE_BOUND@[33; 44) |
38 | PATH_SEGMENT@[33; 44) | 38 | PATH_TYPE@[33; 44) |
39 | NAME_REF@[33; 35) | 39 | PATH@[33; 44) |
40 | IDENT@[33; 35) "Fn" | 40 | PATH_SEGMENT@[33; 44) |
41 | PARAM_LIST@[35; 44) | 41 | NAME_REF@[33; 35) |
42 | L_PAREN@[35; 36) | 42 | IDENT@[33; 35) "Fn" |
43 | PARAM@[36; 43) | 43 | PARAM_LIST@[35; 44) |
44 | REFERENCE_TYPE@[36; 43) | 44 | L_PAREN@[35; 36) |
45 | AMP@[36; 37) | 45 | PARAM@[36; 43) |
46 | LIFETIME@[37; 39) "'a" | 46 | REFERENCE_TYPE@[36; 43) |
47 | WHITESPACE@[39; 40) | 47 | AMP@[36; 37) |
48 | PATH_TYPE@[40; 43) | 48 | LIFETIME@[37; 39) "'a" |
49 | PATH@[40; 43) | 49 | WHITESPACE@[39; 40) |
50 | PATH_SEGMENT@[40; 43) | 50 | PATH_TYPE@[40; 43) |
51 | NAME_REF@[40; 43) | 51 | PATH@[40; 43) |
52 | IDENT@[40; 43) "str" | 52 | PATH_SEGMENT@[40; 43) |
53 | R_PAREN@[43; 44) | 53 | NAME_REF@[40; 43) |
54 | IDENT@[40; 43) "str" | ||
55 | R_PAREN@[43; 44) | ||
54 | WHITESPACE@[44; 45) | 56 | WHITESPACE@[44; 45) |
55 | BLOCK@[45; 48) | 57 | BLOCK@[45; 48) |
56 | L_CURLY@[45; 46) | 58 | L_CURLY@[45; 46) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt index b20f13267..0cbe7c56c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt | |||
@@ -11,19 +11,22 @@ SOURCE_FILE@[0; 28) | |||
11 | IDENT@[7; 8) "T" | 11 | IDENT@[7; 8) "T" |
12 | COLON@[8; 9) | 12 | COLON@[8; 9) |
13 | WHITESPACE@[9; 10) | 13 | WHITESPACE@[9; 10) |
14 | PATH_TYPE@[10; 22) | 14 | TYPE_BOUND_LIST@[10; 22) |
15 | PATH@[10; 15) | 15 | TYPE_BOUND@[10; 15) |
16 | PATH_SEGMENT@[10; 15) | 16 | PATH_TYPE@[10; 15) |
17 | NAME_REF@[10; 15) | 17 | PATH@[10; 15) |
18 | IDENT@[10; 15) "Clone" | 18 | PATH_SEGMENT@[10; 15) |
19 | NAME_REF@[10; 15) | ||
20 | IDENT@[10; 15) "Clone" | ||
19 | WHITESPACE@[15; 16) | 21 | WHITESPACE@[15; 16) |
20 | PLUS@[16; 17) | 22 | PLUS@[16; 17) |
21 | WHITESPACE@[17; 18) | 23 | WHITESPACE@[17; 18) |
22 | PATH_TYPE@[18; 22) | 24 | TYPE_BOUND@[18; 22) |
23 | PATH@[18; 22) | 25 | PATH_TYPE@[18; 22) |
24 | PATH_SEGMENT@[18; 22) | 26 | PATH@[18; 22) |
25 | NAME_REF@[18; 22) | 27 | PATH_SEGMENT@[18; 22) |
26 | IDENT@[18; 22) "Copy" | 28 | NAME_REF@[18; 22) |
29 | IDENT@[18; 22) "Copy" | ||
27 | R_ANGLE@[22; 23) | 30 | R_ANGLE@[22; 23) |
28 | PARAM_LIST@[23; 25) | 31 | PARAM_LIST@[23; 25) |
29 | L_PAREN@[23; 24) | 32 | L_PAREN@[23; 24) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt index 745cf8798..81479d2ea 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt | |||
@@ -11,26 +11,30 @@ SOURCE_FILE@[0; 35) | |||
11 | IDENT@[9; 10) "T" | 11 | IDENT@[9; 10) "T" |
12 | COLON@[10; 11) | 12 | COLON@[10; 11) |
13 | WHITESPACE@[11; 12) | 13 | WHITESPACE@[11; 12) |
14 | LIFETIME@[12; 14) "'a" | 14 | TYPE_BOUND_LIST@[12; 32) |
15 | WHITESPACE@[14; 15) | 15 | TYPE_BOUND@[12; 14) |
16 | PLUS@[15; 16) | 16 | LIFETIME@[12; 14) "'a" |
17 | WHITESPACE@[16; 17) | 17 | WHITESPACE@[14; 15) |
18 | QUESTION@[17; 18) | 18 | PLUS@[15; 16) |
19 | PATH_TYPE@[18; 32) | 19 | WHITESPACE@[16; 17) |
20 | PATH@[18; 23) | 20 | TYPE_BOUND@[17; 23) |
21 | PATH_SEGMENT@[18; 23) | 21 | QUESTION@[17; 18) |
22 | NAME_REF@[18; 23) | 22 | PATH_TYPE@[18; 23) |
23 | IDENT@[18; 23) "Sized" | 23 | PATH@[18; 23) |
24 | PATH_SEGMENT@[18; 23) | ||
25 | NAME_REF@[18; 23) | ||
26 | IDENT@[18; 23) "Sized" | ||
24 | WHITESPACE@[23; 24) | 27 | WHITESPACE@[23; 24) |
25 | PLUS@[24; 25) | 28 | PLUS@[24; 25) |
26 | WHITESPACE@[25; 26) | 29 | WHITESPACE@[25; 26) |
27 | L_PAREN@[26; 27) | 30 | TYPE_BOUND@[26; 32) |
28 | PATH_TYPE@[27; 31) | 31 | L_PAREN@[26; 27) |
29 | PATH@[27; 31) | 32 | PATH_TYPE@[27; 31) |
30 | PATH_SEGMENT@[27; 31) | 33 | PATH@[27; 31) |
31 | NAME_REF@[27; 31) | 34 | PATH_SEGMENT@[27; 31) |
32 | IDENT@[27; 31) "Copy" | 35 | NAME_REF@[27; 31) |
33 | R_PAREN@[31; 32) | 36 | IDENT@[27; 31) "Copy" |
37 | R_PAREN@[31; 32) | ||
34 | R_ANGLE@[32; 33) | 38 | R_ANGLE@[32; 33) |
35 | SEMI@[33; 34) | 39 | SEMI@[33; 34) |
36 | WHITESPACE@[34; 35) | 40 | WHITESPACE@[34; 35) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt index 9a5f46bab..c99a03155 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt | |||
@@ -16,11 +16,13 @@ SOURCE_FILE@[0; 31) | |||
16 | IDENT@[15; 18) "Foo" | 16 | IDENT@[15; 18) "Foo" |
17 | COLON@[18; 19) | 17 | COLON@[18; 19) |
18 | WHITESPACE@[19; 20) | 18 | WHITESPACE@[19; 20) |
19 | PATH_TYPE@[20; 24) | 19 | TYPE_BOUND_LIST@[20; 24) |
20 | PATH@[20; 24) | 20 | TYPE_BOUND@[20; 24) |
21 | PATH_SEGMENT@[20; 24) | 21 | PATH_TYPE@[20; 24) |
22 | NAME_REF@[20; 24) | 22 | PATH@[20; 24) |
23 | IDENT@[20; 24) "Copy" | 23 | PATH_SEGMENT@[20; 24) |
24 | NAME_REF@[20; 24) | ||
25 | IDENT@[20; 24) "Copy" | ||
24 | WHITESPACE@[24; 25) | 26 | WHITESPACE@[24; 25) |
25 | EQ@[25; 26) | 27 | EQ@[25; 26) |
26 | WHITESPACE@[26; 27) | 28 | WHITESPACE@[26; 27) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt index 3b676fb4c..31dbbe96c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt | |||
@@ -10,31 +10,34 @@ SOURCE_FILE@[0; 43) | |||
10 | IMPL_TRAIT_TYPE@[9; 41) | 10 | IMPL_TRAIT_TYPE@[9; 41) |
11 | IMPL_KW@[9; 13) | 11 | IMPL_KW@[9; 13) |
12 | WHITESPACE@[13; 14) | 12 | WHITESPACE@[13; 14) |
13 | PATH_TYPE@[14; 41) | 13 | TYPE_BOUND_LIST@[14; 41) |
14 | PATH@[14; 36) | 14 | TYPE_BOUND@[14; 36) |
15 | PATH_SEGMENT@[14; 36) | 15 | PATH_TYPE@[14; 36) |
16 | NAME_REF@[14; 22) | 16 | PATH@[14; 36) |
17 | IDENT@[14; 22) "Iterator" | 17 | PATH_SEGMENT@[14; 36) |
18 | TYPE_ARG_LIST@[22; 36) | 18 | NAME_REF@[14; 22) |
19 | L_ANGLE@[22; 23) | 19 | IDENT@[14; 22) "Iterator" |
20 | ASSOC_TYPE_ARG@[23; 35) | 20 | TYPE_ARG_LIST@[22; 36) |
21 | NAME_REF@[23; 27) | 21 | L_ANGLE@[22; 23) |
22 | IDENT@[23; 27) "Item" | 22 | ASSOC_TYPE_ARG@[23; 35) |
23 | EQ@[27; 28) | 23 | NAME_REF@[23; 27) |
24 | PATH_TYPE@[28; 35) | 24 | IDENT@[23; 27) "Item" |
25 | PATH@[28; 35) | 25 | EQ@[27; 28) |
26 | PATH_SEGMENT@[28; 35) | 26 | PATH_TYPE@[28; 35) |
27 | NAME_REF@[28; 31) | 27 | PATH@[28; 35) |
28 | IDENT@[28; 31) "Foo" | 28 | PATH_SEGMENT@[28; 35) |
29 | TYPE_ARG_LIST@[31; 35) | 29 | NAME_REF@[28; 31) |
30 | L_ANGLE@[31; 32) | 30 | IDENT@[28; 31) "Foo" |
31 | LIFETIME_ARG@[32; 34) | 31 | TYPE_ARG_LIST@[31; 35) |
32 | LIFETIME@[32; 34) "'a" | 32 | L_ANGLE@[31; 32) |
33 | R_ANGLE@[34; 35) | 33 | LIFETIME_ARG@[32; 34) |
34 | R_ANGLE@[35; 36) | 34 | LIFETIME@[32; 34) "'a" |
35 | R_ANGLE@[34; 35) | ||
36 | R_ANGLE@[35; 36) | ||
35 | WHITESPACE@[36; 37) | 37 | WHITESPACE@[36; 37) |
36 | PLUS@[37; 38) | 38 | PLUS@[37; 38) |
37 | WHITESPACE@[38; 39) | 39 | WHITESPACE@[38; 39) |
38 | LIFETIME@[39; 41) "'a" | 40 | TYPE_BOUND@[39; 41) |
41 | LIFETIME@[39; 41) "'a" | ||
39 | SEMI@[41; 42) | 42 | SEMI@[41; 42) |
40 | WHITESPACE@[42; 43) | 43 | WHITESPACE@[42; 43) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.rs index b571a5860..bfe8e4b36 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.rs +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.rs | |||
@@ -2,4 +2,5 @@ fn foo() { | |||
2 | 82 as i32; | 2 | 82 as i32; |
3 | 81 as i8 + 1; | 3 | 81 as i8 + 1; |
4 | 79 as i16 - 1; | 4 | 79 as i16 - 1; |
5 | 0x36 as u8 <= 0x37; | ||
5 | } | 6 | } |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.txt index cb56aef0b..875ed1abd 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@[0; 65) | 1 | SOURCE_FILE@[0; 89) |
2 | FN_DEF@[0; 64) | 2 | FN_DEF@[0; 88) |
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; 65) | |||
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; 64) | 11 | BLOCK@[9; 88) |
12 | L_CURLY@[9; 10) | 12 | L_CURLY@[9; 10) |
13 | WHITESPACE@[10; 15) | 13 | WHITESPACE@[10; 15) |
14 | EXPR_STMT@[15; 25) | 14 | EXPR_STMT@[15; 25) |
@@ -64,6 +64,26 @@ SOURCE_FILE@[0; 65) | |||
64 | LITERAL@[60; 61) | 64 | LITERAL@[60; 61) |
65 | INT_NUMBER@[60; 61) "1" | 65 | INT_NUMBER@[60; 61) "1" |
66 | SEMI@[61; 62) | 66 | SEMI@[61; 62) |
67 | WHITESPACE@[62; 63) | 67 | WHITESPACE@[62; 67) |
68 | R_CURLY@[63; 64) | 68 | EXPR_STMT@[67; 86) |
69 | WHITESPACE@[64; 65) | 69 | BIN_EXPR@[67; 85) |
70 | CAST_EXPR@[67; 77) | ||
71 | LITERAL@[67; 71) | ||
72 | INT_NUMBER@[67; 71) "0x36" | ||
73 | WHITESPACE@[71; 72) | ||
74 | AS_KW@[72; 74) | ||
75 | WHITESPACE@[74; 75) | ||
76 | PATH_TYPE@[75; 77) | ||
77 | PATH@[75; 77) | ||
78 | PATH_SEGMENT@[75; 77) | ||
79 | NAME_REF@[75; 77) | ||
80 | IDENT@[75; 77) "u8" | ||
81 | WHITESPACE@[77; 78) | ||
82 | LTEQ@[78; 80) | ||
83 | WHITESPACE@[80; 81) | ||
84 | LITERAL@[81; 85) | ||
85 | INT_NUMBER@[81; 85) "0x37" | ||
86 | SEMI@[85; 86) | ||
87 | WHITESPACE@[86; 87) | ||
88 | R_CURLY@[87; 88) | ||
89 | WHITESPACE@[88; 89) | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs index 4385afca9..32761dd03 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs | |||
@@ -1 +1,2 @@ | |||
1 | trait T<U>: Hash + Clone where U: Copy {} | 1 | trait T<U>: Hash + Clone where U: Copy {} |
2 | trait X<U: Debug + Display>: Hash + Clone where U: Copy {} | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt index 333a737ec..56cfea5b3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | SOURCE_FILE@[0; 42) | 1 | SOURCE_FILE@[0; 101) |
2 | TRAIT_DEF@[0; 41) | 2 | TRAIT_DEF@[0; 41) |
3 | TRAIT_KW@[0; 5) | 3 | TRAIT_KW@[0; 5) |
4 | WHITESPACE@[5; 6) | 4 | WHITESPACE@[5; 6) |
@@ -12,19 +12,22 @@ SOURCE_FILE@[0; 42) | |||
12 | R_ANGLE@[9; 10) | 12 | R_ANGLE@[9; 10) |
13 | COLON@[10; 11) | 13 | COLON@[10; 11) |
14 | WHITESPACE@[11; 12) | 14 | WHITESPACE@[11; 12) |
15 | PATH_TYPE@[12; 24) | 15 | TYPE_BOUND_LIST@[12; 24) |
16 | PATH@[12; 16) | 16 | TYPE_BOUND@[12; 16) |
17 | PATH_SEGMENT@[12; 16) | 17 | PATH_TYPE@[12; 16) |
18 | NAME_REF@[12; 16) | 18 | PATH@[12; 16) |
19 | IDENT@[12; 16) "Hash" | 19 | PATH_SEGMENT@[12; 16) |
20 | NAME_REF@[12; 16) | ||
21 | IDENT@[12; 16) "Hash" | ||
20 | WHITESPACE@[16; 17) | 22 | WHITESPACE@[16; 17) |
21 | PLUS@[17; 18) | 23 | PLUS@[17; 18) |
22 | WHITESPACE@[18; 19) | 24 | WHITESPACE@[18; 19) |
23 | PATH_TYPE@[19; 24) | 25 | TYPE_BOUND@[19; 24) |
24 | PATH@[19; 24) | 26 | PATH_TYPE@[19; 24) |
25 | PATH_SEGMENT@[19; 24) | 27 | PATH@[19; 24) |
26 | NAME_REF@[19; 24) | 28 | PATH_SEGMENT@[19; 24) |
27 | IDENT@[19; 24) "Clone" | 29 | NAME_REF@[19; 24) |
30 | IDENT@[19; 24) "Clone" | ||
28 | WHITESPACE@[24; 25) | 31 | WHITESPACE@[24; 25) |
29 | WHERE_CLAUSE@[25; 38) | 32 | WHERE_CLAUSE@[25; 38) |
30 | WHERE_KW@[25; 30) | 33 | WHERE_KW@[25; 30) |
@@ -37,13 +40,86 @@ SOURCE_FILE@[0; 42) | |||
37 | IDENT@[31; 32) "U" | 40 | IDENT@[31; 32) "U" |
38 | COLON@[32; 33) | 41 | COLON@[32; 33) |
39 | WHITESPACE@[33; 34) | 42 | WHITESPACE@[33; 34) |
40 | PATH_TYPE@[34; 38) | 43 | TYPE_BOUND_LIST@[34; 38) |
41 | PATH@[34; 38) | 44 | TYPE_BOUND@[34; 38) |
42 | PATH_SEGMENT@[34; 38) | 45 | PATH_TYPE@[34; 38) |
43 | NAME_REF@[34; 38) | 46 | PATH@[34; 38) |
44 | IDENT@[34; 38) "Copy" | 47 | PATH_SEGMENT@[34; 38) |
48 | NAME_REF@[34; 38) | ||
49 | IDENT@[34; 38) "Copy" | ||
45 | WHITESPACE@[38; 39) | 50 | WHITESPACE@[38; 39) |
46 | ITEM_LIST@[39; 41) | 51 | ITEM_LIST@[39; 41) |
47 | L_CURLY@[39; 40) | 52 | L_CURLY@[39; 40) |
48 | R_CURLY@[40; 41) | 53 | R_CURLY@[40; 41) |
49 | WHITESPACE@[41; 42) | 54 | WHITESPACE@[41; 42) |
55 | TRAIT_DEF@[42; 100) | ||
56 | TRAIT_KW@[42; 47) | ||
57 | WHITESPACE@[47; 48) | ||
58 | NAME@[48; 49) | ||
59 | IDENT@[48; 49) "X" | ||
60 | TYPE_PARAM_LIST@[49; 69) | ||
61 | L_ANGLE@[49; 50) | ||
62 | TYPE_PARAM@[50; 68) | ||
63 | NAME@[50; 51) | ||
64 | IDENT@[50; 51) "U" | ||
65 | COLON@[51; 52) | ||
66 | WHITESPACE@[52; 53) | ||
67 | TYPE_BOUND_LIST@[53; 68) | ||
68 | TYPE_BOUND@[53; 58) | ||
69 | PATH_TYPE@[53; 58) | ||
70 | PATH@[53; 58) | ||
71 | PATH_SEGMENT@[53; 58) | ||
72 | NAME_REF@[53; 58) | ||
73 | IDENT@[53; 58) "Debug" | ||
74 | WHITESPACE@[58; 59) | ||
75 | PLUS@[59; 60) | ||
76 | WHITESPACE@[60; 61) | ||
77 | TYPE_BOUND@[61; 68) | ||
78 | PATH_TYPE@[61; 68) | ||
79 | PATH@[61; 68) | ||
80 | PATH_SEGMENT@[61; 68) | ||
81 | NAME_REF@[61; 68) | ||
82 | IDENT@[61; 68) "Display" | ||
83 | R_ANGLE@[68; 69) | ||
84 | COLON@[69; 70) | ||
85 | WHITESPACE@[70; 71) | ||
86 | TYPE_BOUND_LIST@[71; 83) | ||
87 | TYPE_BOUND@[71; 75) | ||
88 | PATH_TYPE@[71; 75) | ||
89 | PATH@[71; 75) | ||
90 | PATH_SEGMENT@[71; 75) | ||
91 | NAME_REF@[71; 75) | ||
92 | IDENT@[71; 75) "Hash" | ||
93 | WHITESPACE@[75; 76) | ||
94 | PLUS@[76; 77) | ||
95 | WHITESPACE@[77; 78) | ||
96 | TYPE_BOUND@[78; 83) | ||
97 | PATH_TYPE@[78; 83) | ||
98 | PATH@[78; 83) | ||
99 | PATH_SEGMENT@[78; 83) | ||
100 | NAME_REF@[78; 83) | ||
101 | IDENT@[78; 83) "Clone" | ||
102 | WHITESPACE@[83; 84) | ||
103 | WHERE_CLAUSE@[84; 97) | ||
104 | WHERE_KW@[84; 89) | ||
105 | WHITESPACE@[89; 90) | ||
106 | WHERE_PRED@[90; 97) | ||
107 | PATH_TYPE@[90; 91) | ||
108 | PATH@[90; 91) | ||
109 | PATH_SEGMENT@[90; 91) | ||
110 | NAME_REF@[90; 91) | ||
111 | IDENT@[90; 91) "U" | ||
112 | COLON@[91; 92) | ||
113 | WHITESPACE@[92; 93) | ||
114 | TYPE_BOUND_LIST@[93; 97) | ||
115 | TYPE_BOUND@[93; 97) | ||
116 | PATH_TYPE@[93; 97) | ||
117 | PATH@[93; 97) | ||
118 | PATH_SEGMENT@[93; 97) | ||
119 | NAME_REF@[93; 97) | ||
120 | IDENT@[93; 97) "Copy" | ||
121 | WHITESPACE@[97; 98) | ||
122 | ITEM_LIST@[98; 100) | ||
123 | L_CURLY@[98; 99) | ||
124 | R_CURLY@[99; 100) | ||
125 | WHITESPACE@[100; 101) | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt index 2ce7a6714..3786a787a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt | |||
@@ -11,29 +11,31 @@ SOURCE_FILE@[0; 35) | |||
11 | IDENT@[7; 8) "F" | 11 | IDENT@[7; 8) "F" |
12 | COLON@[8; 9) | 12 | COLON@[8; 9) |
13 | WHITESPACE@[9; 10) | 13 | WHITESPACE@[9; 10) |
14 | PATH_TYPE@[10; 29) | 14 | TYPE_BOUND_LIST@[10; 29) |
15 | PATH@[10; 29) | 15 | TYPE_BOUND@[10; 29) |
16 | PATH_SEGMENT@[10; 29) | 16 | PATH_TYPE@[10; 29) |
17 | NAME_REF@[10; 15) | 17 | PATH@[10; 29) |
18 | IDENT@[10; 15) "FnMut" | 18 | PATH_SEGMENT@[10; 29) |
19 | PARAM_LIST@[15; 29) | 19 | NAME_REF@[10; 15) |
20 | L_PAREN@[15; 16) | 20 | IDENT@[10; 15) "FnMut" |
21 | PARAM@[16; 28) | 21 | PARAM_LIST@[15; 29) |
22 | REFERENCE_TYPE@[16; 28) | 22 | L_PAREN@[15; 16) |
23 | AMP@[16; 17) | 23 | PARAM@[16; 28) |
24 | MUT_KW@[17; 20) | 24 | REFERENCE_TYPE@[16; 28) |
25 | WHITESPACE@[20; 21) | 25 | AMP@[16; 17) |
26 | PATH_TYPE@[21; 28) | 26 | MUT_KW@[17; 20) |
27 | PATH@[21; 28) | 27 | WHITESPACE@[20; 21) |
28 | PATH_SEGMENT@[21; 28) | 28 | PATH_TYPE@[21; 28) |
29 | NAME_REF@[21; 24) | 29 | PATH@[21; 28) |
30 | IDENT@[21; 24) "Foo" | 30 | PATH_SEGMENT@[21; 28) |
31 | TYPE_ARG_LIST@[24; 28) | 31 | NAME_REF@[21; 24) |
32 | L_ANGLE@[24; 25) | 32 | IDENT@[21; 24) "Foo" |
33 | LIFETIME_ARG@[25; 27) | 33 | TYPE_ARG_LIST@[24; 28) |
34 | LIFETIME@[25; 27) "'a" | 34 | L_ANGLE@[24; 25) |
35 | R_ANGLE@[27; 28) | 35 | LIFETIME_ARG@[25; 27) |
36 | R_PAREN@[28; 29) | 36 | LIFETIME@[25; 27) "'a" |
37 | R_ANGLE@[27; 28) | ||
38 | R_PAREN@[28; 29) | ||
37 | R_ANGLE@[29; 30) | 39 | R_ANGLE@[29; 30) |
38 | PARAM_LIST@[30; 32) | 40 | PARAM_LIST@[30; 32) |
39 | L_PAREN@[30; 31) | 41 | L_PAREN@[30; 31) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs index 215210e27..4bb0f63b7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs | |||
@@ -1 +1,2 @@ | |||
1 | fn foo() -> Box<T + 'f> {} | 1 | fn foo() -> Box<T + 'f> {} |
2 | fn foo() -> Box<dyn T + 'f> {} | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt index 911a27ea1..6faf4d3b9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | SOURCE_FILE@[0; 27) | 1 | SOURCE_FILE@[0; 58) |
2 | FN_DEF@[0; 26) | 2 | FN_DEF@[0; 26) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) |
@@ -19,18 +19,63 @@ SOURCE_FILE@[0; 27) | |||
19 | TYPE_ARG_LIST@[15; 23) | 19 | TYPE_ARG_LIST@[15; 23) |
20 | L_ANGLE@[15; 16) | 20 | L_ANGLE@[15; 16) |
21 | TYPE_ARG@[16; 22) | 21 | TYPE_ARG@[16; 22) |
22 | PATH_TYPE@[16; 22) | 22 | DYN_TRAIT_TYPE@[16; 22) |
23 | PATH@[16; 17) | 23 | TYPE_BOUND_LIST@[16; 22) |
24 | PATH_SEGMENT@[16; 17) | 24 | TYPE_BOUND@[16; 17) |
25 | NAME_REF@[16; 17) | 25 | PATH_TYPE@[16; 17) |
26 | IDENT@[16; 17) "T" | 26 | PATH@[16; 17) |
27 | WHITESPACE@[17; 18) | 27 | PATH_SEGMENT@[16; 17) |
28 | PLUS@[18; 19) | 28 | NAME_REF@[16; 17) |
29 | WHITESPACE@[19; 20) | 29 | IDENT@[16; 17) "T" |
30 | LIFETIME@[20; 22) "'f" | 30 | WHITESPACE@[17; 18) |
31 | PLUS@[18; 19) | ||
32 | WHITESPACE@[19; 20) | ||
33 | TYPE_BOUND@[20; 22) | ||
34 | LIFETIME@[20; 22) "'f" | ||
31 | R_ANGLE@[22; 23) | 35 | R_ANGLE@[22; 23) |
32 | WHITESPACE@[23; 24) | 36 | WHITESPACE@[23; 24) |
33 | BLOCK@[24; 26) | 37 | BLOCK@[24; 26) |
34 | L_CURLY@[24; 25) | 38 | L_CURLY@[24; 25) |
35 | R_CURLY@[25; 26) | 39 | R_CURLY@[25; 26) |
36 | WHITESPACE@[26; 27) | 40 | WHITESPACE@[26; 27) |
41 | FN_DEF@[27; 57) | ||
42 | FN_KW@[27; 29) | ||
43 | WHITESPACE@[29; 30) | ||
44 | NAME@[30; 33) | ||
45 | IDENT@[30; 33) "foo" | ||
46 | PARAM_LIST@[33; 35) | ||
47 | L_PAREN@[33; 34) | ||
48 | R_PAREN@[34; 35) | ||
49 | WHITESPACE@[35; 36) | ||
50 | RET_TYPE@[36; 54) | ||
51 | THIN_ARROW@[36; 38) | ||
52 | WHITESPACE@[38; 39) | ||
53 | PATH_TYPE@[39; 54) | ||
54 | PATH@[39; 54) | ||
55 | PATH_SEGMENT@[39; 54) | ||
56 | NAME_REF@[39; 42) | ||
57 | IDENT@[39; 42) "Box" | ||
58 | TYPE_ARG_LIST@[42; 54) | ||
59 | L_ANGLE@[42; 43) | ||
60 | TYPE_ARG@[43; 53) | ||
61 | DYN_TRAIT_TYPE@[43; 53) | ||
62 | DYN_KW@[43; 46) | ||
63 | WHITESPACE@[46; 47) | ||
64 | TYPE_BOUND_LIST@[47; 53) | ||
65 | TYPE_BOUND@[47; 48) | ||
66 | PATH_TYPE@[47; 48) | ||
67 | PATH@[47; 48) | ||
68 | PATH_SEGMENT@[47; 48) | ||
69 | NAME_REF@[47; 48) | ||
70 | IDENT@[47; 48) "T" | ||
71 | WHITESPACE@[48; 49) | ||
72 | PLUS@[49; 50) | ||
73 | WHITESPACE@[50; 51) | ||
74 | TYPE_BOUND@[51; 53) | ||
75 | LIFETIME@[51; 53) "'f" | ||
76 | R_ANGLE@[53; 54) | ||
77 | WHITESPACE@[54; 55) | ||
78 | BLOCK@[55; 57) | ||
79 | L_CURLY@[55; 56) | ||
80 | R_CURLY@[56; 57) | ||
81 | WHITESPACE@[57; 58) | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt index 68485dc0b..77a62ab4d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt | |||
@@ -15,11 +15,14 @@ SOURCE_FILE@[0; 116) | |||
15 | LIFETIME@[18; 20) "'a" | 15 | LIFETIME@[18; 20) "'a" |
16 | COLON@[20; 21) | 16 | COLON@[20; 21) |
17 | WHITESPACE@[21; 22) | 17 | WHITESPACE@[21; 22) |
18 | LIFETIME@[22; 24) "'b" | 18 | TYPE_BOUND_LIST@[22; 29) |
19 | WHITESPACE@[24; 25) | 19 | TYPE_BOUND@[22; 24) |
20 | PLUS@[25; 26) | 20 | LIFETIME@[22; 24) "'b" |
21 | WHITESPACE@[26; 27) | 21 | WHITESPACE@[24; 25) |
22 | LIFETIME@[27; 29) "'c" | 22 | PLUS@[25; 26) |
23 | WHITESPACE@[26; 27) | ||
24 | TYPE_BOUND@[27; 29) | ||
25 | LIFETIME@[27; 29) "'c" | ||
23 | COMMA@[29; 30) | 26 | COMMA@[29; 30) |
24 | WHITESPACE@[30; 34) | 27 | WHITESPACE@[30; 34) |
25 | WHERE_PRED@[34; 59) | 28 | WHERE_PRED@[34; 59) |
@@ -30,22 +33,26 @@ SOURCE_FILE@[0; 116) | |||
30 | IDENT@[34; 35) "T" | 33 | IDENT@[34; 35) "T" |
31 | COLON@[35; 36) | 34 | COLON@[35; 36) |
32 | WHITESPACE@[36; 37) | 35 | WHITESPACE@[36; 37) |
33 | PATH_TYPE@[37; 59) | 36 | TYPE_BOUND_LIST@[37; 59) |
34 | PATH@[37; 42) | 37 | TYPE_BOUND@[37; 42) |
35 | PATH_SEGMENT@[37; 42) | 38 | PATH_TYPE@[37; 42) |
36 | NAME_REF@[37; 42) | 39 | PATH@[37; 42) |
37 | IDENT@[37; 42) "Clone" | 40 | PATH_SEGMENT@[37; 42) |
41 | NAME_REF@[37; 42) | ||
42 | IDENT@[37; 42) "Clone" | ||
38 | WHITESPACE@[42; 43) | 43 | WHITESPACE@[42; 43) |
39 | PLUS@[43; 44) | 44 | PLUS@[43; 44) |
40 | WHITESPACE@[44; 45) | 45 | WHITESPACE@[44; 45) |
41 | PATH_TYPE@[45; 59) | 46 | TYPE_BOUND@[45; 49) |
42 | PATH@[45; 49) | 47 | PATH_TYPE@[45; 49) |
43 | PATH_SEGMENT@[45; 49) | 48 | PATH@[45; 49) |
44 | NAME_REF@[45; 49) | 49 | PATH_SEGMENT@[45; 49) |
45 | IDENT@[45; 49) "Copy" | 50 | NAME_REF@[45; 49) |
46 | WHITESPACE@[49; 50) | 51 | IDENT@[45; 49) "Copy" |
47 | PLUS@[50; 51) | 52 | WHITESPACE@[49; 50) |
48 | WHITESPACE@[51; 52) | 53 | PLUS@[50; 51) |
54 | WHITESPACE@[51; 52) | ||
55 | TYPE_BOUND@[52; 59) | ||
49 | LIFETIME@[52; 59) "'static" | 56 | LIFETIME@[52; 59) "'static" |
50 | COMMA@[59; 60) | 57 | COMMA@[59; 60) |
51 | WHITESPACE@[60; 64) | 58 | WHITESPACE@[60; 64) |
@@ -62,7 +69,9 @@ SOURCE_FILE@[0; 116) | |||
62 | IDENT@[74; 78) "Item" | 69 | IDENT@[74; 78) "Item" |
63 | COLON@[78; 79) | 70 | COLON@[78; 79) |
64 | WHITESPACE@[79; 80) | 71 | WHITESPACE@[79; 80) |
65 | LIFETIME@[80; 82) "'a" | 72 | TYPE_BOUND_LIST@[80; 82) |
73 | TYPE_BOUND@[80; 82) | ||
74 | LIFETIME@[80; 82) "'a" | ||
66 | COMMA@[82; 83) | 75 | COMMA@[82; 83) |
67 | WHITESPACE@[83; 87) | 76 | WHITESPACE@[83; 87) |
68 | WHERE_PRED@[87; 112) | 77 | WHERE_PRED@[87; 112) |
@@ -91,7 +100,9 @@ SOURCE_FILE@[0; 116) | |||
91 | IDENT@[104; 108) "Item" | 100 | IDENT@[104; 108) "Item" |
92 | COLON@[108; 109) | 101 | COLON@[108; 109) |
93 | WHITESPACE@[109; 110) | 102 | WHITESPACE@[109; 110) |
94 | LIFETIME@[110; 112) "'a" | 103 | TYPE_BOUND_LIST@[110; 112) |
104 | TYPE_BOUND@[110; 112) | ||
105 | LIFETIME@[110; 112) "'a" | ||
95 | WHITESPACE@[112; 113) | 106 | WHITESPACE@[112; 113) |
96 | BLOCK@[113; 115) | 107 | BLOCK@[113; 115) |
97 | L_CURLY@[113; 114) | 108 | L_CURLY@[113; 114) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt index f6a0967f2..e33d8ada1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt | |||
@@ -10,31 +10,34 @@ SOURCE_FILE@[0; 42) | |||
10 | DYN_TRAIT_TYPE@[9; 40) | 10 | DYN_TRAIT_TYPE@[9; 40) |
11 | DYN_KW@[9; 12) | 11 | DYN_KW@[9; 12) |
12 | WHITESPACE@[12; 13) | 12 | WHITESPACE@[12; 13) |
13 | PATH_TYPE@[13; 40) | 13 | TYPE_BOUND_LIST@[13; 40) |
14 | PATH@[13; 35) | 14 | TYPE_BOUND@[13; 35) |
15 | PATH_SEGMENT@[13; 35) | 15 | PATH_TYPE@[13; 35) |
16 | NAME_REF@[13; 21) | 16 | PATH@[13; 35) |
17 | IDENT@[13; 21) "Iterator" | 17 | PATH_SEGMENT@[13; 35) |
18 | TYPE_ARG_LIST@[21; 35) | 18 | NAME_REF@[13; 21) |
19 | L_ANGLE@[21; 22) | 19 | IDENT@[13; 21) "Iterator" |
20 | ASSOC_TYPE_ARG@[22; 34) | 20 | TYPE_ARG_LIST@[21; 35) |
21 | NAME_REF@[22; 26) | 21 | L_ANGLE@[21; 22) |
22 | IDENT@[22; 26) "Item" | 22 | ASSOC_TYPE_ARG@[22; 34) |
23 | EQ@[26; 27) | 23 | NAME_REF@[22; 26) |
24 | PATH_TYPE@[27; 34) | 24 | IDENT@[22; 26) "Item" |
25 | PATH@[27; 34) | 25 | EQ@[26; 27) |
26 | PATH_SEGMENT@[27; 34) | 26 | PATH_TYPE@[27; 34) |
27 | NAME_REF@[27; 30) | 27 | PATH@[27; 34) |
28 | IDENT@[27; 30) "Foo" | 28 | PATH_SEGMENT@[27; 34) |
29 | TYPE_ARG_LIST@[30; 34) | 29 | NAME_REF@[27; 30) |
30 | L_ANGLE@[30; 31) | 30 | IDENT@[27; 30) "Foo" |
31 | LIFETIME_ARG@[31; 33) | 31 | TYPE_ARG_LIST@[30; 34) |
32 | LIFETIME@[31; 33) "'a" | 32 | L_ANGLE@[30; 31) |
33 | R_ANGLE@[33; 34) | 33 | LIFETIME_ARG@[31; 33) |
34 | R_ANGLE@[34; 35) | 34 | LIFETIME@[31; 33) "'a" |
35 | R_ANGLE@[33; 34) | ||
36 | R_ANGLE@[34; 35) | ||
35 | WHITESPACE@[35; 36) | 37 | WHITESPACE@[35; 36) |
36 | PLUS@[36; 37) | 38 | PLUS@[36; 37) |
37 | WHITESPACE@[37; 38) | 39 | WHITESPACE@[37; 38) |
38 | LIFETIME@[38; 40) "'a" | 40 | TYPE_BOUND@[38; 40) |
41 | LIFETIME@[38; 40) "'a" | ||
39 | SEMI@[40; 41) | 42 | SEMI@[40; 41) |
40 | WHITESPACE@[41; 42) | 43 | WHITESPACE@[41; 42) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt index b58d09e35..1603b531e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt | |||
@@ -25,11 +25,13 @@ SOURCE_FILE@[0; 29) | |||
25 | IDENT@[18; 19) "T" | 25 | IDENT@[18; 19) "T" |
26 | COLON@[19; 20) | 26 | COLON@[19; 20) |
27 | WHITESPACE@[20; 21) | 27 | WHITESPACE@[20; 21) |
28 | PATH_TYPE@[21; 25) | 28 | TYPE_BOUND_LIST@[21; 25) |
29 | PATH@[21; 25) | 29 | TYPE_BOUND@[21; 25) |
30 | PATH_SEGMENT@[21; 25) | 30 | PATH_TYPE@[21; 25) |
31 | NAME_REF@[21; 25) | 31 | PATH@[21; 25) |
32 | IDENT@[21; 25) "Copy" | 32 | PATH_SEGMENT@[21; 25) |
33 | NAME_REF@[21; 25) | ||
34 | IDENT@[21; 25) "Copy" | ||
33 | WHITESPACE@[25; 26) | 35 | WHITESPACE@[25; 26) |
34 | BLOCK@[26; 28) | 36 | BLOCK@[26; 28) |
35 | L_CURLY@[26; 27) | 37 | L_CURLY@[26; 27) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt index 568f61fb2..36c856cd7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt | |||
@@ -80,11 +80,13 @@ SOURCE_FILE@[0; 135) | |||
80 | IDENT@[65; 66) "T" | 80 | IDENT@[65; 66) "T" |
81 | COLON@[66; 67) | 81 | COLON@[66; 67) |
82 | WHITESPACE@[67; 68) | 82 | WHITESPACE@[67; 68) |
83 | PATH_TYPE@[68; 76) | 83 | TYPE_BOUND_LIST@[68; 76) |
84 | PATH@[68; 76) | 84 | TYPE_BOUND@[68; 76) |
85 | PATH_SEGMENT@[68; 76) | 85 | PATH_TYPE@[68; 76) |
86 | NAME_REF@[68; 76) | 86 | PATH@[68; 76) |
87 | IDENT@[68; 76) "Iterator" | 87 | PATH_SEGMENT@[68; 76) |
88 | NAME_REF@[68; 76) | ||
89 | IDENT@[68; 76) "Iterator" | ||
88 | WHITESPACE@[76; 77) | 90 | WHITESPACE@[76; 77) |
89 | BLOCK@[77; 79) | 91 | BLOCK@[77; 79) |
90 | L_CURLY@[77; 78) | 92 | L_CURLY@[77; 78) |
@@ -143,11 +145,13 @@ SOURCE_FILE@[0; 135) | |||
143 | IDENT@[120; 121) "T" | 145 | IDENT@[120; 121) "T" |
144 | COLON@[121; 122) | 146 | COLON@[121; 122) |
145 | WHITESPACE@[122; 123) | 147 | WHITESPACE@[122; 123) |
146 | PATH_TYPE@[123; 131) | 148 | TYPE_BOUND_LIST@[123; 131) |
147 | PATH@[123; 131) | 149 | TYPE_BOUND@[123; 131) |
148 | PATH_SEGMENT@[123; 131) | 150 | PATH_TYPE@[123; 131) |
149 | NAME_REF@[123; 131) | 151 | PATH@[123; 131) |
150 | IDENT@[123; 131) "Iterator" | 152 | PATH_SEGMENT@[123; 131) |
153 | NAME_REF@[123; 131) | ||
154 | IDENT@[123; 131) "Iterator" | ||
151 | WHITESPACE@[131; 132) | 155 | WHITESPACE@[131; 132) |
152 | BLOCK@[132; 134) | 156 | BLOCK@[132; 134) |
153 | L_CURLY@[132; 133) | 157 | L_CURLY@[132; 133) |
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) | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt index 4f439f21c..dec038fc1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt | |||
@@ -31,11 +31,13 @@ SOURCE_FILE@[0; 53) | |||
31 | IDENT@[24; 25) "T" | 31 | IDENT@[24; 25) "T" |
32 | COLON@[25; 26) | 32 | COLON@[25; 26) |
33 | WHITESPACE@[26; 27) | 33 | WHITESPACE@[26; 27) |
34 | PATH_TYPE@[27; 32) | 34 | TYPE_BOUND_LIST@[27; 32) |
35 | PATH@[27; 32) | 35 | TYPE_BOUND@[27; 32) |
36 | PATH_SEGMENT@[27; 32) | 36 | PATH_TYPE@[27; 32) |
37 | NAME_REF@[27; 32) | 37 | PATH@[27; 32) |
38 | IDENT@[27; 32) "Clone" | 38 | PATH_SEGMENT@[27; 32) |
39 | NAME_REF@[27; 32) | ||
40 | IDENT@[27; 32) "Clone" | ||
39 | SEMI@[32; 33) | 41 | SEMI@[32; 33) |
40 | WHITESPACE@[33; 34) | 42 | WHITESPACE@[33; 34) |
41 | STRUCT_DEF@[34; 52) | 43 | STRUCT_DEF@[34; 52) |