aboutsummaryrefslogtreecommitdiff
path: root/tests/data/parser/inline
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-07-30 21:20:02 +0100
committerAleksey Kladov <[email protected]>2018-07-30 21:20:02 +0100
commit70b337292117a9bb90e85056dcb4069f8bbc6c0a (patch)
tree4a5f28a2f14d53e5a07b1735ec60931093fd7280 /tests/data/parser/inline
parent27a40e0a8844310960f12294fe7cd1f5b6d25fcb (diff)
Don't allocate when traversing children
Diffstat (limited to 'tests/data/parser/inline')
-rw-r--r--tests/data/parser/inline/0041_type_param_bounds.rs1
-rw-r--r--tests/data/parser/inline/0041_type_param_bounds.txt33
-rw-r--r--tests/data/parser/inline/0042_type_param_default.rs1
-rw-r--r--tests/data/parser/inline/0042_type_param_default.txt21
4 files changed, 56 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0041_type_param_bounds.rs b/tests/data/parser/inline/0041_type_param_bounds.rs
new file mode 100644
index 000000000..919bde0ee
--- /dev/null
+++ b/tests/data/parser/inline/0041_type_param_bounds.rs
@@ -0,0 +1 @@
struct S<T: 'a + ?Sized + (Copy)>;
diff --git a/tests/data/parser/inline/0041_type_param_bounds.txt b/tests/data/parser/inline/0041_type_param_bounds.txt
new file mode 100644
index 000000000..d607bd416
--- /dev/null
+++ b/tests/data/parser/inline/0041_type_param_bounds.txt
@@ -0,0 +1,33 @@
1FILE@[0; 35)
2 STRUCT_ITEM@[0; 35)
3 STRUCT_KW@[0; 6)
4 NAME@[6; 8)
5 WHITESPACE@[6; 7)
6 IDENT@[7; 8) "S"
7 TYPE_PARAM_LIST@[8; 33)
8 L_ANGLE@[8; 9)
9 TYPE_PARAM@[9; 32)
10 IDENT@[9; 10) "T"
11 COLON@[10; 11)
12 WHITESPACE@[11; 12)
13 LIFETIME@[12; 14) "'a"
14 WHITESPACE@[14; 15)
15 PLUS@[15; 16)
16 WHITESPACE@[16; 17)
17 QUESTION@[17; 18)
18 PATH@[18; 24)
19 PATH_SEGMENT@[18; 24)
20 NAME_REF@[18; 24)
21 IDENT@[18; 23) "Sized"
22 WHITESPACE@[23; 24)
23 PLUS@[24; 25)
24 WHITESPACE@[25; 26)
25 L_PAREN@[26; 27)
26 PATH@[27; 31)
27 PATH_SEGMENT@[27; 31)
28 NAME_REF@[27; 31)
29 IDENT@[27; 31) "Copy"
30 R_PAREN@[31; 32)
31 R_ANGLE@[32; 33)
32 SEMI@[33; 34)
33 WHITESPACE@[34; 35)
diff --git a/tests/data/parser/inline/0042_type_param_default.rs b/tests/data/parser/inline/0042_type_param_default.rs
new file mode 100644
index 000000000..540eacb02
--- /dev/null
+++ b/tests/data/parser/inline/0042_type_param_default.rs
@@ -0,0 +1 @@
struct S<T = i32>;
diff --git a/tests/data/parser/inline/0042_type_param_default.txt b/tests/data/parser/inline/0042_type_param_default.txt
new file mode 100644
index 000000000..9642a9084
--- /dev/null
+++ b/tests/data/parser/inline/0042_type_param_default.txt
@@ -0,0 +1,21 @@
1FILE@[0; 19)
2 STRUCT_ITEM@[0; 19)
3 STRUCT_KW@[0; 6)
4 NAME@[6; 8)
5 WHITESPACE@[6; 7)
6 IDENT@[7; 8) "S"
7 TYPE_PARAM_LIST@[8; 17)
8 L_ANGLE@[8; 9)
9 TYPE_PARAM@[9; 16)
10 IDENT@[9; 10) "T"
11 WHITESPACE@[10; 11)
12 EQ@[11; 12)
13 PATH_TYPE@[12; 16)
14 PATH@[12; 16)
15 PATH_SEGMENT@[12; 16)
16 NAME_REF@[12; 16)
17 WHITESPACE@[12; 13)
18 IDENT@[13; 16) "i32"
19 R_ANGLE@[16; 17)
20 SEMI@[17; 18)
21 WHITESPACE@[18; 19)