diff options
Diffstat (limited to 'tests/data/parser/inline')
4 files changed, 55 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0021_pointer_type_no_mutability.rs b/tests/data/parser/inline/0021_pointer_type_no_mutability.rs new file mode 100644 index 000000000..fae705131 --- /dev/null +++ b/tests/data/parser/inline/0021_pointer_type_no_mutability.rs | |||
@@ -0,0 +1 @@ | |||
type T = *(); | |||
diff --git a/tests/data/parser/inline/0021_pointer_type_no_mutability.txt b/tests/data/parser/inline/0021_pointer_type_no_mutability.txt new file mode 100644 index 000000000..f7720a712 --- /dev/null +++ b/tests/data/parser/inline/0021_pointer_type_no_mutability.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | FILE@[0; 14) | ||
2 | TYPE_ITEM@[0; 14) | ||
3 | TYPE_KW@[0; 4) | ||
4 | NAME@[4; 7) | ||
5 | WHITESPACE@[4; 5) | ||
6 | IDENT@[5; 6) "T" | ||
7 | WHITESPACE@[6; 7) | ||
8 | EQ@[7; 8) | ||
9 | POINTER_TYPE@[8; 12) | ||
10 | WHITESPACE@[8; 9) | ||
11 | STAR@[9; 10) | ||
12 | err: `expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)` | ||
13 | TUPLE_TYPE@[10; 12) | ||
14 | L_PAREN@[10; 11) | ||
15 | R_PAREN@[11; 12) | ||
16 | SEMI@[12; 13) | ||
17 | WHITESPACE@[13; 14) | ||
diff --git a/tests/data/parser/inline/0022_pointer_type_mut.rs b/tests/data/parser/inline/0022_pointer_type_mut.rs new file mode 100644 index 000000000..04b2bb9ba --- /dev/null +++ b/tests/data/parser/inline/0022_pointer_type_mut.rs | |||
@@ -0,0 +1,2 @@ | |||
1 | type M = *mut (); | ||
2 | type C = *mut (); | ||
diff --git a/tests/data/parser/inline/0022_pointer_type_mut.txt b/tests/data/parser/inline/0022_pointer_type_mut.txt new file mode 100644 index 000000000..c3ab2b887 --- /dev/null +++ b/tests/data/parser/inline/0022_pointer_type_mut.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | FILE@[0; 36) | ||
2 | TYPE_ITEM@[0; 18) | ||
3 | TYPE_KW@[0; 4) | ||
4 | NAME@[4; 7) | ||
5 | WHITESPACE@[4; 5) | ||
6 | IDENT@[5; 6) "M" | ||
7 | WHITESPACE@[6; 7) | ||
8 | EQ@[7; 8) | ||
9 | POINTER_TYPE@[8; 16) | ||
10 | WHITESPACE@[8; 9) | ||
11 | STAR@[9; 10) | ||
12 | MUT_KW@[10; 13) | ||
13 | TUPLE_TYPE@[13; 16) | ||
14 | WHITESPACE@[13; 14) | ||
15 | L_PAREN@[14; 15) | ||
16 | R_PAREN@[15; 16) | ||
17 | SEMI@[16; 17) | ||
18 | WHITESPACE@[17; 18) | ||
19 | TYPE_ITEM@[18; 36) | ||
20 | TYPE_KW@[18; 22) | ||
21 | NAME@[22; 25) | ||
22 | WHITESPACE@[22; 23) | ||
23 | IDENT@[23; 24) "C" | ||
24 | WHITESPACE@[24; 25) | ||
25 | EQ@[25; 26) | ||
26 | POINTER_TYPE@[26; 34) | ||
27 | WHITESPACE@[26; 27) | ||
28 | STAR@[27; 28) | ||
29 | MUT_KW@[28; 31) | ||
30 | TUPLE_TYPE@[31; 34) | ||
31 | WHITESPACE@[31; 32) | ||
32 | L_PAREN@[32; 33) | ||
33 | R_PAREN@[33; 34) | ||
34 | SEMI@[34; 35) | ||
35 | WHITESPACE@[35; 36) | ||