aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'crates/syntax')
-rw-r--r--crates/syntax/test_data/parser/inline/ok/0164_const_generic_negated_literal.rast30
-rw-r--r--crates/syntax/test_data/parser/inline/ok/0164_const_generic_negated_literal.rs1
-rw-r--r--crates/syntax/test_data/parser/inline/ok/0165_const_param_defaults.rast96
-rw-r--r--crates/syntax/test_data/parser/inline/ok/0165_const_param_defaults.rs3
4 files changed, 130 insertions, 0 deletions
diff --git a/crates/syntax/test_data/parser/inline/ok/0164_const_generic_negated_literal.rast b/crates/syntax/test_data/parser/inline/ok/0164_const_generic_negated_literal.rast
new file mode 100644
index 000000000..b20e523dc
--- /dev/null
+++ b/crates/syntax/test_data/parser/inline/ok/0164_const_generic_negated_literal.rast
@@ -0,0 +1,30 @@
1[email protected]
2 [email protected]
3 [email protected] "fn"
4 [email protected] " "
5 [email protected]
6 [email protected] "f"
7 [email protected]
8 [email protected] "("
9 [email protected] ")"
10 [email protected] " "
11 [email protected]
12 [email protected] "{"
13 [email protected] " "
14 [email protected]
15 [email protected]
16 [email protected]
17 [email protected]
18 [email protected] "S"
19 [email protected]
20 [email protected] "::"
21 [email protected] "<"
22 [email protected]
23 [email protected]
24 [email protected] "-"
25 [email protected]
26 [email protected] "1"
27 [email protected] ">"
28 [email protected] " "
29 [email protected] "}"
30 [email protected] "\n"
diff --git a/crates/syntax/test_data/parser/inline/ok/0164_const_generic_negated_literal.rs b/crates/syntax/test_data/parser/inline/ok/0164_const_generic_negated_literal.rs
new file mode 100644
index 000000000..8a81d05cd
--- /dev/null
+++ b/crates/syntax/test_data/parser/inline/ok/0164_const_generic_negated_literal.rs
@@ -0,0 +1 @@
fn f() { S::<-1> }
diff --git a/crates/syntax/test_data/parser/inline/ok/0165_const_param_defaults.rast b/crates/syntax/test_data/parser/inline/ok/0165_const_param_defaults.rast
new file mode 100644
index 000000000..e8f40a4cd
--- /dev/null
+++ b/crates/syntax/test_data/parser/inline/ok/0165_const_param_defaults.rast
@@ -0,0 +1,96 @@
1[email protected]
2 [email protected]
3 [email protected] "struct"
4 [email protected] " "
5 [email protected]
6 [email protected] "A"
7 [email protected]
8 [email protected] "<"
9 [email protected]
10 [email protected] "const"
11 [email protected] " "
12 [email protected]
13 [email protected] "N"
14 [email protected] ":"
15 [email protected] " "
16 [email protected]
17 [email protected]
18 [email protected]
19 [email protected]
20 [email protected] "i32"
21 [email protected] " "
22 [email protected] "="
23 [email protected] " "
24 [email protected]
25 [email protected]
26 [email protected] "-"
27 [email protected]
28 [email protected] "1"
29 [email protected] ">"
30 [email protected] ";"
31 [email protected] "\n"
32 [email protected]
33 [email protected] "struct"
34 [email protected] " "
35 [email protected]
36 [email protected] "B"
37 [email protected]
38 [email protected] "<"
39 [email protected]
40 [email protected] "const"
41 [email protected] " "
42 [email protected]
43 [email protected] "N"
44 [email protected] ":"
45 [email protected] " "
46 [email protected]
47 [email protected]
48 [email protected]
49 [email protected]
50 [email protected] "i32"
51 [email protected] " "
52 [email protected] "="
53 [email protected] " "
54 [email protected]
55 [email protected]
56 [email protected] "{"
57 [email protected] "}"
58 [email protected] ">"
59 [email protected] ";"
60 [email protected] "\n"
61 [email protected]
62 [email protected] "struct"
63 [email protected] " "
64 [email protected]
65 [email protected] "C"
66 [email protected]
67 [email protected] "<"
68 [email protected]
69 [email protected] "const"
70 [email protected] " "
71 [email protected]
72 [email protected] "N"
73 [email protected] ":"
74 [email protected] " "
75 [email protected]
76 [email protected]
77 [email protected]
78 [email protected]
79 [email protected] "i32"
80 [email protected] " "
81 [email protected] "="
82 [email protected] " "
83 [email protected]
84 [email protected]
85 [email protected]
86 [email protected]
87 [email protected]
88 [email protected]
89 [email protected] "some"
90 [email protected] "::"
91 [email protected]
92 [email protected]
93 [email protected] "CONST"
94 [email protected] ">"
95 [email protected] ";"
96 [email protected] "\n"
diff --git a/crates/syntax/test_data/parser/inline/ok/0165_const_param_defaults.rs b/crates/syntax/test_data/parser/inline/ok/0165_const_param_defaults.rs
new file mode 100644
index 000000000..68388c8fb
--- /dev/null
+++ b/crates/syntax/test_data/parser/inline/ok/0165_const_param_defaults.rs
@@ -0,0 +1,3 @@
1struct A<const N: i32 = -1>;
2struct B<const N: i32 = {}>;
3struct C<const N: i32 = some::CONST>;