aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/tests/data
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-24 18:50:37 +0100
committerAleksey Kladov <[email protected]>2018-08-24 18:50:37 +0100
commitf104458d45e30024f8a4a02c1ad4101ed74b08f9 (patch)
tree4317dc4c504a90ea0876c862b049eee6d6513e98 /crates/libsyntax2/tests/data
parentb0aac1ca98280efee9587897d86ef447933004dd (diff)
parameter parsing does not destroy blocks
Diffstat (limited to 'crates/libsyntax2/tests/data')
-rw-r--r--crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.rs2
-rw-r--r--crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.txt24
2 files changed, 26 insertions, 0 deletions
diff --git a/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.rs b/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.rs
new file mode 100644
index 000000000..156e70251
--- /dev/null
+++ b/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.rs
@@ -0,0 +1,2 @@
1fn foo(}) {
2}
diff --git a/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.txt b/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.txt
new file mode 100644
index 000000000..841379797
--- /dev/null
+++ b/crates/libsyntax2/tests/data/parser/err/0015_curly_in_params.txt
@@ -0,0 +1,24 @@
1FILE@[0; 14)
2 FN_DEF@[0; 7)
3 FN_KW@[0; 2)
4 WHITESPACE@[2; 3)
5 NAME@[3; 6)
6 IDENT@[3; 6) "foo"
7 PARAM_LIST@[6; 7)
8 L_PAREN@[6; 7)
9 err: `expected value parameter`
10 err: `expected R_PAREN`
11 err: `expected SEMI`
12 err: `expected an item`
13 ERROR@[7; 8)
14 R_CURLY@[7; 8)
15 err: `expected an item`
16 ERROR@[8; 9)
17 R_PAREN@[8; 9)
18 WHITESPACE@[9; 10)
19 err: `expected an item`
20 ERROR@[10; 13)
21 L_CURLY@[10; 11)
22 WHITESPACE@[11; 12)
23 R_CURLY@[12; 13)
24 WHITESPACE@[13; 14)