diff options
Diffstat (limited to 'crates/ra_syntax')
5 files changed, 78 insertions, 25 deletions
diff --git a/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast index 06a326d26..3bf57eacc 100644 --- a/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast +++ b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast | |||
@@ -40,5 +40,5 @@ [email protected] | |||
40 | [email protected] "\n" | 40 | [email protected] "\n" |
41 | [email protected] "}" | 41 | [email protected] "}" |
42 | [email protected] "\n" | 42 | [email protected] "\n" |
43 | error 24..24: expected `{` | 43 | error 24..24: expected a block |
44 | error 24..24: expected SEMICOLON | 44 | error 24..24: expected SEMICOLON |
diff --git a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast b/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast new file mode 100644 index 000000000..e46456384 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast | |||
@@ -0,0 +1,71 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "fn" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] "main" | ||
7 | [email protected] | ||
8 | [email protected] "(" | ||
9 | [email protected] ")" | ||
10 | [email protected] " " | ||
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] "unsafe" | ||
20 | [email protected] " " | ||
21 | [email protected] | ||
22 | [email protected] "92" | ||
23 | [email protected] " " | ||
24 | [email protected] "}" | ||
25 | [email protected] "\n " | ||
26 | [email protected] | ||
27 | [email protected] | ||
28 | [email protected] "{" | ||
29 | [email protected] " " | ||
30 | [email protected] | ||
31 | [email protected] "async" | ||
32 | [email protected] " " | ||
33 | [email protected] | ||
34 | [email protected] "92" | ||
35 | [email protected] " " | ||
36 | [email protected] "}" | ||
37 | [email protected] "\n " | ||
38 | [email protected] | ||
39 | [email protected] | ||
40 | [email protected] "{" | ||
41 | [email protected] " " | ||
42 | [email protected] | ||
43 | [email protected] | ||
44 | [email protected] "try" | ||
45 | [email protected] " " | ||
46 | [email protected] | ||
47 | [email protected] "92" | ||
48 | [email protected] " " | ||
49 | [email protected] "}" | ||
50 | [email protected] "\n " | ||
51 | [email protected] | ||
52 | [email protected] "{" | ||
53 | [email protected] " " | ||
54 | [email protected] | ||
55 | [email protected] | ||
56 | [email protected] | ||
57 | [email protected] "\'label" | ||
58 | [email protected] ":" | ||
59 | [email protected] " " | ||
60 | [email protected] | ||
61 | [email protected] "92" | ||
62 | [email protected] " " | ||
63 | [email protected] "}" | ||
64 | [email protected] "\n" | ||
65 | [email protected] "}" | ||
66 | [email protected] "\n" | ||
67 | error 24..24: expected existential, fn, trait or impl | ||
68 | error 41..41: expected existential, fn, trait or impl | ||
69 | error 56..56: expected a block | ||
70 | error 75..75: expected a loop | ||
71 | error 75..75: expected SEMICOLON | ||
diff --git a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rs b/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rs new file mode 100644 index 000000000..8fa324c1a --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rs | |||
@@ -0,0 +1,6 @@ | |||
1 | fn main() { | ||
2 | { unsafe 92 } | ||
3 | { async 92 } | ||
4 | { try 92 } | ||
5 | { 'label: 92 } | ||
6 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.rast deleted file mode 100644 index f3a5e3096..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.rast +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "fn" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] "foo" | ||
7 | [email protected] | ||
8 | [email protected] "(" | ||
9 | [email protected] ")" | ||
10 | [email protected] " " | ||
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] "\n" | ||
20 | [email protected] "}" | ||
21 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.rs deleted file mode 100644 index 9c6019fb1..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.rs +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | fn foo() { | ||
2 | {}; | ||
3 | } | ||