diff options
Diffstat (limited to 'crates/libsyntax2/tests/data/parser/inline')
4 files changed, 78 insertions, 5 deletions
diff --git a/crates/libsyntax2/tests/data/parser/inline/0058_type_arg.rs b/crates/libsyntax2/tests/data/parser/inline/0058_type_arg.rs index 385c43131..f0c8cc3a8 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0058_type_arg.rs +++ b/crates/libsyntax2/tests/data/parser/inline/0058_type_arg.rs | |||
@@ -1 +1 @@ | |||
type A = B<'static, i32, Item=u64>; | type A = B<'static, i32, Item=u64> | ||
diff --git a/crates/libsyntax2/tests/data/parser/inline/0058_type_arg.txt b/crates/libsyntax2/tests/data/parser/inline/0058_type_arg.txt index 6fc29c03d..297456ec4 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0058_type_arg.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0058_type_arg.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | FILE@[0; 36) | 1 | FILE@[0; 35) |
2 | TYPE_DEF@[0; 35) | 2 | TYPE_DEF@[0; 34) |
3 | TYPE_KW@[0; 4) | 3 | TYPE_KW@[0; 4) |
4 | WHITESPACE@[4; 5) | 4 | WHITESPACE@[4; 5) |
5 | NAME@[5; 6) | 5 | NAME@[5; 6) |
@@ -36,5 +36,5 @@ FILE@[0; 36) | |||
36 | NAME_REF@[30; 33) | 36 | NAME_REF@[30; 33) |
37 | IDENT@[30; 33) "u64" | 37 | IDENT@[30; 33) "u64" |
38 | R_ANGLE@[33; 34) | 38 | R_ANGLE@[33; 34) |
39 | SEMI@[34; 35) | 39 | err: `expected SEMI` |
40 | WHITESPACE@[35; 36) | 40 | WHITESPACE@[34; 35) |
diff --git a/crates/libsyntax2/tests/data/parser/inline/0104_arb_self_types.rs b/crates/libsyntax2/tests/data/parser/inline/0104_arb_self_types.rs new file mode 100644 index 000000000..2bf2a69f6 --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/inline/0104_arb_self_types.rs | |||
@@ -0,0 +1,4 @@ | |||
1 | impl S { | ||
2 | fn a(self: &Self) {} | ||
3 | fn b(self: Box<Self>) {} | ||
4 | } | ||
diff --git a/crates/libsyntax2/tests/data/parser/inline/0104_arb_self_types.txt b/crates/libsyntax2/tests/data/parser/inline/0104_arb_self_types.txt new file mode 100644 index 000000000..41e3505fe --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/inline/0104_arb_self_types.txt | |||
@@ -0,0 +1,69 @@ | |||
1 | FILE@[0; 65) | ||
2 | IMPL_ITEM@[0; 64) | ||
3 | IMPL_KW@[0; 4) | ||
4 | WHITESPACE@[4; 5) | ||
5 | PATH_TYPE@[5; 6) | ||
6 | PATH@[5; 6) | ||
7 | PATH_SEGMENT@[5; 6) | ||
8 | NAME_REF@[5; 6) | ||
9 | IDENT@[5; 6) "S" | ||
10 | WHITESPACE@[6; 7) | ||
11 | L_CURLY@[7; 8) | ||
12 | WHITESPACE@[8; 13) | ||
13 | FN_DEF@[13; 33) | ||
14 | FN_KW@[13; 15) | ||
15 | WHITESPACE@[15; 16) | ||
16 | NAME@[16; 17) | ||
17 | IDENT@[16; 17) "a" | ||
18 | PARAM_LIST@[17; 30) | ||
19 | L_PAREN@[17; 18) | ||
20 | SELF_PARAM@[18; 29) | ||
21 | SELF_KW@[18; 22) | ||
22 | COLON@[22; 23) | ||
23 | WHITESPACE@[23; 24) | ||
24 | REFERENCE_TYPE@[24; 29) | ||
25 | AMP@[24; 25) | ||
26 | PATH_TYPE@[25; 29) | ||
27 | PATH@[25; 29) | ||
28 | PATH_SEGMENT@[25; 29) | ||
29 | NAME_REF@[25; 29) | ||
30 | IDENT@[25; 29) "Self" | ||
31 | R_PAREN@[29; 30) | ||
32 | WHITESPACE@[30; 31) | ||
33 | BLOCK_EXPR@[31; 33) | ||
34 | L_CURLY@[31; 32) | ||
35 | R_CURLY@[32; 33) | ||
36 | WHITESPACE@[33; 38) | ||
37 | FN_DEF@[38; 62) | ||
38 | FN_KW@[38; 40) | ||
39 | WHITESPACE@[40; 41) | ||
40 | NAME@[41; 42) | ||
41 | IDENT@[41; 42) "b" | ||
42 | PARAM_LIST@[42; 59) | ||
43 | L_PAREN@[42; 43) | ||
44 | SELF_PARAM@[43; 58) | ||
45 | SELF_KW@[43; 47) | ||
46 | COLON@[47; 48) | ||
47 | WHITESPACE@[48; 49) | ||
48 | PATH_TYPE@[49; 58) | ||
49 | PATH@[49; 58) | ||
50 | PATH_SEGMENT@[49; 58) | ||
51 | NAME_REF@[49; 52) | ||
52 | IDENT@[49; 52) "Box" | ||
53 | TYPE_ARG_LIST@[52; 58) | ||
54 | L_ANGLE@[52; 53) | ||
55 | TYPE_ARG@[53; 57) | ||
56 | PATH_TYPE@[53; 57) | ||
57 | PATH@[53; 57) | ||
58 | PATH_SEGMENT@[53; 57) | ||
59 | NAME_REF@[53; 57) | ||
60 | IDENT@[53; 57) "Self" | ||
61 | R_ANGLE@[57; 58) | ||
62 | R_PAREN@[58; 59) | ||
63 | WHITESPACE@[59; 60) | ||
64 | BLOCK_EXPR@[60; 62) | ||
65 | L_CURLY@[60; 61) | ||
66 | R_CURLY@[61; 62) | ||
67 | WHITESPACE@[62; 63) | ||
68 | R_CURLY@[63; 64) | ||
69 | WHITESPACE@[64; 65) | ||