aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/tests
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-31 11:35:48 +0100
committerAleksey Kladov <[email protected]>2018-08-31 11:35:48 +0100
commit8fc7f438c4347e027deda5cda4bcd5e560610bb7 (patch)
treefea53412ee0462dbecc6071a85164c18bd5f9fa6 /crates/libsyntax2/tests
parentfaebae74e48e3e7e0d3dfddc5b5cf0b18535cc6b (diff)
start item recovery
Diffstat (limited to 'crates/libsyntax2/tests')
-rw-r--r--crates/libsyntax2/tests/data/parser/err/0020_fn_recover.rs3
-rw-r--r--crates/libsyntax2/tests/data/parser/err/0020_fn_recover.txt20
2 files changed, 23 insertions, 0 deletions
diff --git a/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.rs b/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.rs
new file mode 100644
index 000000000..3393b668b
--- /dev/null
+++ b/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.rs
@@ -0,0 +1,3 @@
1fn
2
3fn foo() {}
diff --git a/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.txt b/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.txt
new file mode 100644
index 000000000..b5218b0fa
--- /dev/null
+++ b/crates/libsyntax2/tests/data/parser/err/0020_fn_recover.txt
@@ -0,0 +1,20 @@
1ROOT@[0; 16)
2 FN_DEF@[0; 2)
3 FN_KW@[0; 2)
4 err: `expected a name`
5 err: `expected function arguments`
6 err: `expected a block`
7 WHITESPACE@[2; 4)
8 FN_DEF@[4; 15)
9 FN_KW@[4; 6)
10 WHITESPACE@[6; 7)
11 NAME@[7; 10)
12 IDENT@[7; 10) "foo"
13 PARAM_LIST@[10; 12)
14 L_PAREN@[10; 11)
15 R_PAREN@[11; 12)
16 WHITESPACE@[12; 13)
17 BLOCK@[13; 15)
18 L_CURLY@[13; 14)
19 R_CURLY@[14; 15)
20 WHITESPACE@[15; 16)