aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/tests/data/parser/err
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-13 16:23:14 +0100
committerAleksey Kladov <[email protected]>2018-08-13 16:24:17 +0100
commit9149fd2c0ca3d23719082852a2cddd8ba5804ce6 (patch)
treef15d90dc80b6fd4d8e1bb966a171cb06a64cf9c0 /crates/libsyntax2/tests/data/parser/err
parentd1eceefeb8b683da3f64b89446f04f01803962e1 (diff)
Fix some parser bugs
Diffstat (limited to 'crates/libsyntax2/tests/data/parser/err')
-rw-r--r--crates/libsyntax2/tests/data/parser/err/0004_use_path_bad_segment.txt16
-rw-r--r--crates/libsyntax2/tests/data/parser/err/0014_where_no_bounds.rs1
-rw-r--r--crates/libsyntax2/tests/data/parser/err/0014_where_no_bounds.txt31
3 files changed, 38 insertions, 10 deletions
diff --git a/crates/libsyntax2/tests/data/parser/err/0004_use_path_bad_segment.txt b/crates/libsyntax2/tests/data/parser/err/0004_use_path_bad_segment.txt
index c6ae68103..64aa07801 100644
--- a/crates/libsyntax2/tests/data/parser/err/0004_use_path_bad_segment.txt
+++ b/crates/libsyntax2/tests/data/parser/err/0004_use_path_bad_segment.txt
@@ -1,20 +1,16 @@
1FILE@[0; 12) 1FILE@[0; 12)
2 USE_ITEM@[0; 9) 2 USE_ITEM@[0; 12)
3 USE_KW@[0; 3) 3 USE_KW@[0; 3)
4 WHITESPACE@[3; 4) 4 WHITESPACE@[3; 4)
5 USE_TREE@[4; 9) 5 USE_TREE@[4; 11)
6 PATH@[4; 9) 6 PATH@[4; 11)
7 PATH@[4; 7) 7 PATH@[4; 7)
8 PATH_SEGMENT@[4; 7) 8 PATH_SEGMENT@[4; 7)
9 NAME_REF@[4; 7) 9 NAME_REF@[4; 7)
10 IDENT@[4; 7) "foo" 10 IDENT@[4; 7) "foo"
11 COLONCOLON@[7; 9) 11 COLONCOLON@[7; 9)
12 err: `expected identifier` 12 err: `expected identifier`
13 err: `expected SEMI` 13 PATH_SEGMENT@[9; 11)
14 err: `expected an item` 14 ERROR@[9; 11)
15 PATH_SEGMENT@[9; 9) 15 INT_NUMBER@[9; 11) "92"
16 ERROR@[9; 11)
17 INT_NUMBER@[9; 11) "92"
18 err: `expected an item`
19 ERROR@[11; 12)
20 SEMI@[11; 12) 16 SEMI@[11; 12)
diff --git a/crates/libsyntax2/tests/data/parser/err/0014_where_no_bounds.rs b/crates/libsyntax2/tests/data/parser/err/0014_where_no_bounds.rs
new file mode 100644
index 000000000..75c1d2f98
--- /dev/null
+++ b/crates/libsyntax2/tests/data/parser/err/0014_where_no_bounds.rs
@@ -0,0 +1 @@
fn foo<T>() where T {}
diff --git a/crates/libsyntax2/tests/data/parser/err/0014_where_no_bounds.txt b/crates/libsyntax2/tests/data/parser/err/0014_where_no_bounds.txt
new file mode 100644
index 000000000..61444a88d
--- /dev/null
+++ b/crates/libsyntax2/tests/data/parser/err/0014_where_no_bounds.txt
@@ -0,0 +1,31 @@
1FILE@[0; 23)
2 FUNCTION@[0; 22)
3 FN_KW@[0; 2)
4 WHITESPACE@[2; 3)
5 NAME@[3; 6)
6 IDENT@[3; 6) "foo"
7 TYPE_PARAM_LIST@[6; 9)
8 L_ANGLE@[6; 7)
9 TYPE_PARAM@[7; 8)
10 NAME@[7; 8)
11 IDENT@[7; 8) "T"
12 R_ANGLE@[8; 9)
13 PARAM_LIST@[9; 11)
14 L_PAREN@[9; 10)
15 R_PAREN@[10; 11)
16 WHITESPACE@[11; 12)
17 WHERE_CLAUSE@[12; 19)
18 WHERE_KW@[12; 17)
19 WHITESPACE@[17; 18)
20 WHERE_PRED@[18; 19)
21 PATH_TYPE@[18; 19)
22 PATH@[18; 19)
23 PATH_SEGMENT@[18; 19)
24 NAME_REF@[18; 19)
25 IDENT@[18; 19) "T"
26 err: `expected colon`
27 WHITESPACE@[19; 20)
28 BLOCK_EXPR@[20; 22)
29 L_CURLY@[20; 21)
30 R_CURLY@[21; 22)
31 WHITESPACE@[22; 23)