diff options
author | Aleksey Kladov <[email protected]> | 2018-08-04 11:17:24 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-04 11:17:24 +0100 |
commit | e919db3731968ae7a6877530d2cb645b0495d5fd (patch) | |
tree | 02c8f9a9accf0db8f89bdf9c8a8293a81f557568 /tests | |
parent | 7264c3294b3c460da459774058c9b9fa77edac12 (diff) |
refine item parsing
Diffstat (limited to 'tests')
21 files changed, 173 insertions, 35 deletions
diff --git a/tests/data/parser/err/0001_item_recovery_in_file.txt b/tests/data/parser/err/0001_item_recovery_in_file.txt index f35b97b48..49612ac73 100644 --- a/tests/data/parser/err/0001_item_recovery_in_file.txt +++ b/tests/data/parser/err/0001_item_recovery_in_file.txt | |||
@@ -1,9 +1,9 @@ | |||
1 | FILE@[0; 21) | 1 | FILE@[0; 21) |
2 | ERROR@[0; 3) | 2 | ERROR@[0; 3) |
3 | IF_KW@[0; 2) | 3 | IF_KW@[0; 2) |
4 | err: `expected item` | 4 | err: `expected an item` |
5 | WHITESPACE@[2; 3) | 5 | WHITESPACE@[2; 3) |
6 | err: `expected item` | 6 | err: `expected an item` |
7 | ERROR@[3; 10) | 7 | ERROR@[3; 10) |
8 | MATCH_KW@[3; 8) | 8 | MATCH_KW@[3; 8) |
9 | WHITESPACE@[8; 10) | 9 | WHITESPACE@[8; 10) |
diff --git a/tests/data/parser/err/0002_duplicate_shebang.txt b/tests/data/parser/err/0002_duplicate_shebang.txt index 1a4b37da8..ef0ddb09a 100644 --- a/tests/data/parser/err/0002_duplicate_shebang.txt +++ b/tests/data/parser/err/0002_duplicate_shebang.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | FILE@[0; 42) | 1 | FILE@[0; 42) |
2 | SHEBANG@[0; 20) | 2 | SHEBANG@[0; 20) |
3 | err: `expected item` | 3 | err: `expected an item` |
4 | ERROR@[20; 42) | 4 | ERROR@[20; 42) |
5 | WHITESPACE@[20; 21) | 5 | WHITESPACE@[20; 21) |
6 | SHEBANG@[21; 41) | 6 | SHEBANG@[21; 41) |
diff --git a/tests/data/parser/err/0003_C++_semicolon.txt b/tests/data/parser/err/0003_C++_semicolon.txt index dc3cf6c73..0a2dad70d 100644 --- a/tests/data/parser/err/0003_C++_semicolon.txt +++ b/tests/data/parser/err/0003_C++_semicolon.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | FILE@[0; 40) | 1 | FILE@[0; 40) |
2 | STRUCT_ITEM@[0; 39) | 2 | STRUCT_ITEM@[0; 40) |
3 | STRUCT_KW@[0; 6) | 3 | STRUCT_KW@[0; 6) |
4 | NAME@[6; 9) | 4 | NAME@[6; 9) |
5 | WHITESPACE@[6; 7) | 5 | WHITESPACE@[6; 7) |
@@ -34,5 +34,5 @@ FILE@[0; 40) | |||
34 | R_CURLY@[38; 39) | 34 | R_CURLY@[38; 39) |
35 | err: `expected item, found `;` | 35 | err: `expected item, found `;` |
36 | consider removing this semicolon` | 36 | consider removing this semicolon` |
37 | ERROR@[39; 40) | 37 | ERROR@[39; 40) |
38 | SEMI@[39; 40) | 38 | SEMI@[39; 40) |
diff --git a/tests/data/parser/err/0004_use_path_bad_segment.txt b/tests/data/parser/err/0004_use_path_bad_segment.txt index 6eb6123ec..9b827d862 100644 --- a/tests/data/parser/err/0004_use_path_bad_segment.txt +++ b/tests/data/parser/err/0004_use_path_bad_segment.txt | |||
@@ -11,11 +11,10 @@ FILE@[0; 12) | |||
11 | COLONCOLON@[7; 9) | 11 | COLONCOLON@[7; 9) |
12 | err: `expected identifier` | 12 | err: `expected identifier` |
13 | err: `expected SEMI` | 13 | err: `expected SEMI` |
14 | err: `expected item` | 14 | err: `expected an item` |
15 | PATH_SEGMENT@[9; 9) | 15 | PATH_SEGMENT@[9; 9) |
16 | ERROR@[9; 11) | 16 | ERROR@[9; 11) |
17 | INT_NUMBER@[9; 11) "92" | 17 | INT_NUMBER@[9; 11) "92" |
18 | err: `expected item, found `;` | 18 | err: `expected an item` |
19 | consider removing this semicolon` | ||
20 | ERROR@[11; 12) | 19 | ERROR@[11; 12) |
21 | SEMI@[11; 12) | 20 | SEMI@[11; 12) |
diff --git a/tests/data/parser/err/0007_stray_curly_in_file.txt b/tests/data/parser/err/0007_stray_curly_in_file.txt index 9758a969f..473fe17cb 100644 --- a/tests/data/parser/err/0007_stray_curly_in_file.txt +++ b/tests/data/parser/err/0007_stray_curly_in_file.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | FILE@[0; 31) | 1 | FILE@[0; 31) |
2 | ERROR@[0; 3) | 2 | ERROR@[0; 3) |
3 | R_CURLY@[0; 1) | 3 | R_CURLY@[0; 1) |
4 | err: `expected item` | 4 | err: `expected an item` |
5 | WHITESPACE@[1; 3) | 5 | WHITESPACE@[1; 3) |
6 | STRUCT_ITEM@[3; 14) | 6 | STRUCT_ITEM@[3; 14) |
7 | STRUCT_KW@[3; 9) | 7 | STRUCT_KW@[3; 9) |
@@ -10,7 +10,7 @@ FILE@[0; 31) | |||
10 | IDENT@[10; 11) "S" | 10 | IDENT@[10; 11) "S" |
11 | SEMI@[11; 12) | 11 | SEMI@[11; 12) |
12 | WHITESPACE@[12; 14) | 12 | WHITESPACE@[12; 14) |
13 | err: `expected item` | 13 | err: `expected an item` |
14 | ERROR@[14; 17) | 14 | ERROR@[14; 17) |
15 | R_CURLY@[14; 15) | 15 | R_CURLY@[14; 15) |
16 | WHITESPACE@[15; 17) | 16 | WHITESPACE@[15; 17) |
@@ -26,7 +26,7 @@ FILE@[0; 31) | |||
26 | L_CURLY@[25; 26) | 26 | L_CURLY@[25; 26) |
27 | R_CURLY@[26; 27) | 27 | R_CURLY@[26; 27) |
28 | WHITESPACE@[27; 29) | 28 | WHITESPACE@[27; 29) |
29 | err: `expected item` | 29 | err: `expected an item` |
30 | ERROR@[29; 31) | 30 | ERROR@[29; 31) |
31 | R_CURLY@[29; 30) | 31 | R_CURLY@[29; 30) |
32 | WHITESPACE@[30; 31) | 32 | WHITESPACE@[30; 31) |
diff --git a/tests/data/parser/err/0008_item_block_recovery.txt b/tests/data/parser/err/0008_item_block_recovery.txt index 5bc62b6e1..80253d8af 100644 --- a/tests/data/parser/err/0008_item_block_recovery.txt +++ b/tests/data/parser/err/0008_item_block_recovery.txt | |||
@@ -13,17 +13,17 @@ FILE@[0; 95) | |||
13 | WHITESPACE@[10; 11) | 13 | WHITESPACE@[10; 11) |
14 | R_CURLY@[11; 12) | 14 | R_CURLY@[11; 12) |
15 | WHITESPACE@[12; 14) | 15 | WHITESPACE@[12; 14) |
16 | err: `expected item` | 16 | err: `expected an item` |
17 | ERROR@[14; 17) | 17 | ERROR@[14; 17) |
18 | IDENT@[14; 17) "bar" | 18 | IDENT@[14; 17) "bar" |
19 | err: `expected item` | 19 | err: `expected an item` |
20 | ERROR@[17; 18) | 20 | ERROR@[17; 18) |
21 | L_PAREN@[17; 18) | 21 | L_PAREN@[17; 18) |
22 | err: `expected item` | 22 | err: `expected an item` |
23 | ERROR@[18; 20) | 23 | ERROR@[18; 20) |
24 | R_PAREN@[18; 19) | 24 | R_PAREN@[18; 19) |
25 | WHITESPACE@[19; 20) | 25 | WHITESPACE@[19; 20) |
26 | err: `expected item` | 26 | err: `expected an item` |
27 | ERROR@[20; 82) | 27 | ERROR@[20; 82) |
28 | L_CURLY@[20; 21) | 28 | L_CURLY@[20; 21) |
29 | WHITESPACE@[21; 26) | 29 | WHITESPACE@[21; 26) |
diff --git a/tests/data/parser/err/0009_broken_struct_type_parameter.txt b/tests/data/parser/err/0009_broken_struct_type_parameter.txt index 700fc550f..72e5b36e5 100644 --- a/tests/data/parser/err/0009_broken_struct_type_parameter.txt +++ b/tests/data/parser/err/0009_broken_struct_type_parameter.txt | |||
@@ -13,18 +13,18 @@ FILE@[0; 43) | |||
13 | err: `expected COMMA` | 13 | err: `expected COMMA` |
14 | err: `expected R_ANGLE` | 14 | err: `expected R_ANGLE` |
15 | err: `expected `;`, `{`, or `(`` | 15 | err: `expected `;`, `{`, or `(`` |
16 | err: `expected item` | 16 | err: `expected an item` |
17 | ERROR@[12; 14) | 17 | ERROR@[12; 14) |
18 | PLUS@[12; 13) | 18 | PLUS@[12; 13) |
19 | WHITESPACE@[13; 14) | 19 | WHITESPACE@[13; 14) |
20 | err: `expected item` | 20 | err: `expected an item` |
21 | ERROR@[14; 15) | 21 | ERROR@[14; 15) |
22 | INT_NUMBER@[14; 15) "2" | 22 | INT_NUMBER@[14; 15) "2" |
23 | err: `expected item` | 23 | err: `expected an item` |
24 | ERROR@[15; 17) | 24 | ERROR@[15; 17) |
25 | R_ANGLE@[15; 16) | 25 | R_ANGLE@[15; 16) |
26 | WHITESPACE@[16; 17) | 26 | WHITESPACE@[16; 17) |
27 | err: `expected item` | 27 | err: `expected an item` |
28 | ERROR@[17; 33) | 28 | ERROR@[17; 33) |
29 | L_CURLY@[17; 18) | 29 | L_CURLY@[17; 18) |
30 | WHITESPACE@[18; 23) | 30 | WHITESPACE@[18; 23) |
diff --git a/tests/data/parser/inline/0006_extern_struct.rs b/tests/data/parser/err/0011_extern_struct.rs index c1bd0a2d1..c1bd0a2d1 100644 --- a/tests/data/parser/inline/0006_extern_struct.rs +++ b/tests/data/parser/err/0011_extern_struct.rs | |||
diff --git a/tests/data/parser/inline/0006_extern_struct.txt b/tests/data/parser/err/0011_extern_struct.txt index f310e1225..288f3469b 100644 --- a/tests/data/parser/inline/0006_extern_struct.txt +++ b/tests/data/parser/err/0011_extern_struct.txt | |||
@@ -1,8 +1,9 @@ | |||
1 | FILE@[0; 19) | 1 | FILE@[0; 19) |
2 | ABI@[0; 7) | 2 | ERROR@[0; 7) |
3 | EXTERN_KW@[0; 6) | 3 | ABI@[0; 7) |
4 | WHITESPACE@[6; 7) | 4 | EXTERN_KW@[0; 6) |
5 | err: `expected `fn` or `{`` | 5 | WHITESPACE@[6; 7) |
6 | err: `expected fn, trait or impl` | ||
6 | STRUCT_ITEM@[7; 19) | 7 | STRUCT_ITEM@[7; 19) |
7 | STRUCT_KW@[7; 13) | 8 | STRUCT_KW@[7; 13) |
8 | NAME@[13; 17) | 9 | NAME@[13; 17) |
diff --git a/tests/data/parser/inline/0013_unsafe_block_in_mod.txt b/tests/data/parser/inline/0013_unsafe_block_in_mod.txt index e5581d615..142838692 100644 --- a/tests/data/parser/inline/0013_unsafe_block_in_mod.txt +++ b/tests/data/parser/inline/0013_unsafe_block_in_mod.txt | |||
@@ -11,10 +11,12 @@ FILE@[0; 33) | |||
11 | L_CURLY@[8; 9) | 11 | L_CURLY@[8; 9) |
12 | R_CURLY@[9; 10) | 12 | R_CURLY@[9; 10) |
13 | WHITESPACE@[10; 11) | 13 | WHITESPACE@[10; 11) |
14 | UNSAFE_KW@[11; 17) | 14 | err: `expected an item` |
15 | err: `expected `trait`, `impl` or `fn`` | 15 | ERROR@[11; 18) |
16 | ERROR@[17; 22) | 16 | UNSAFE_KW@[11; 17) |
17 | WHITESPACE@[17; 18) | 17 | WHITESPACE@[17; 18) |
18 | err: `expected an item` | ||
19 | ERROR@[18; 22) | ||
18 | L_CURLY@[18; 19) | 20 | L_CURLY@[18; 19) |
19 | WHITESPACE@[19; 20) | 21 | WHITESPACE@[19; 20) |
20 | R_CURLY@[20; 21) | 22 | R_CURLY@[20; 21) |
diff --git a/tests/data/parser/inline/0023_array_type_missing_semi.txt b/tests/data/parser/inline/0023_array_type_missing_semi.txt index f3e9ffe4a..aa600eab4 100644 --- a/tests/data/parser/inline/0023_array_type_missing_semi.txt +++ b/tests/data/parser/inline/0023_array_type_missing_semi.txt | |||
@@ -15,14 +15,13 @@ FILE@[0; 18) | |||
15 | WHITESPACE@[12; 13) | 15 | WHITESPACE@[12; 13) |
16 | err: `expected `;` or `]`` | 16 | err: `expected `;` or `]`` |
17 | err: `expected SEMI` | 17 | err: `expected SEMI` |
18 | err: `expected item` | 18 | err: `expected an item` |
19 | ERROR@[13; 15) | 19 | ERROR@[13; 15) |
20 | INT_NUMBER@[13; 15) "92" | 20 | INT_NUMBER@[13; 15) "92" |
21 | err: `expected item` | 21 | err: `expected an item` |
22 | ERROR@[15; 16) | 22 | ERROR@[15; 16) |
23 | R_BRACK@[15; 16) | 23 | R_BRACK@[15; 16) |
24 | err: `expected item, found `;` | 24 | err: `expected an item` |
25 | consider removing this semicolon` | ||
26 | ERROR@[16; 18) | 25 | ERROR@[16; 18) |
27 | SEMI@[16; 17) | 26 | SEMI@[16; 17) |
28 | WHITESPACE@[17; 18) | 27 | WHITESPACE@[17; 18) |
diff --git a/tests/data/parser/inline/0029_fn_pointer_type_missing_fn.txt b/tests/data/parser/inline/0029_fn_pointer_type_missing_fn.txt index c99714ed4..82632b7bf 100644 --- a/tests/data/parser/inline/0029_fn_pointer_type_missing_fn.txt +++ b/tests/data/parser/inline/0029_fn_pointer_type_missing_fn.txt | |||
@@ -11,14 +11,13 @@ FILE@[0; 20) | |||
11 | err: `expected `fn`` | 11 | err: `expected `fn`` |
12 | err: `expected SEMI` | 12 | err: `expected SEMI` |
13 | WHITESPACE@[15; 16) | 13 | WHITESPACE@[15; 16) |
14 | err: `expected item` | 14 | err: `expected an item` |
15 | ERROR@[16; 17) | 15 | ERROR@[16; 17) |
16 | L_PAREN@[16; 17) | 16 | L_PAREN@[16; 17) |
17 | err: `expected item` | 17 | err: `expected an item` |
18 | ERROR@[17; 18) | 18 | ERROR@[17; 18) |
19 | R_PAREN@[17; 18) | 19 | R_PAREN@[17; 18) |
20 | err: `expected item, found `;` | 20 | err: `expected an item` |
21 | consider removing this semicolon` | ||
22 | ERROR@[18; 20) | 21 | ERROR@[18; 20) |
23 | SEMI@[18; 19) | 22 | SEMI@[18; 19) |
24 | WHITESPACE@[19; 20) | 23 | WHITESPACE@[19; 20) |
diff --git a/tests/data/parser/inline/0068_pub_expr.rs b/tests/data/parser/inline/0068_pub_expr.rs new file mode 100644 index 000000000..d9d99d2d3 --- /dev/null +++ b/tests/data/parser/inline/0068_pub_expr.rs | |||
@@ -0,0 +1 @@ | |||
fn foo() { pub 92; } //FIXME | |||
diff --git a/tests/data/parser/inline/0068_pub_expr.txt b/tests/data/parser/inline/0068_pub_expr.txt new file mode 100644 index 000000000..09cf9b262 --- /dev/null +++ b/tests/data/parser/inline/0068_pub_expr.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | FILE@[0; 29) | ||
2 | FN_ITEM@[0; 29) | ||
3 | FN_KW@[0; 2) | ||
4 | NAME@[2; 6) | ||
5 | WHITESPACE@[2; 3) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 9) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 29) | ||
12 | L_CURLY@[9; 10) | ||
13 | EXPR_STMT@[10; 19) | ||
14 | VISIBILITY@[10; 15) | ||
15 | WHITESPACE@[10; 11) | ||
16 | PUB_KW@[11; 14) | ||
17 | WHITESPACE@[14; 15) | ||
18 | LITERAL@[15; 17) | ||
19 | INT_NUMBER@[15; 17) "92" | ||
20 | SEMI@[17; 18) | ||
21 | WHITESPACE@[18; 19) | ||
22 | R_CURLY@[19; 20) | ||
23 | WHITESPACE@[20; 21) | ||
24 | COMMENT@[21; 28) | ||
25 | WHITESPACE@[28; 29) | ||
diff --git a/tests/data/parser/ok/0025_extern_fn_in_block.rs b/tests/data/parser/ok/0025_extern_fn_in_block.rs new file mode 100644 index 000000000..289809809 --- /dev/null +++ b/tests/data/parser/ok/0025_extern_fn_in_block.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | fn main() { | ||
2 | extern fn f() {} | ||
3 | } | ||
diff --git a/tests/data/parser/ok/0025_extern_fn_in_block.txt b/tests/data/parser/ok/0025_extern_fn_in_block.txt new file mode 100644 index 000000000..0623740aa --- /dev/null +++ b/tests/data/parser/ok/0025_extern_fn_in_block.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | FILE@[0; 35) | ||
2 | FN_ITEM@[0; 35) | ||
3 | FN_KW@[0; 2) | ||
4 | NAME@[2; 7) | ||
5 | WHITESPACE@[2; 3) | ||
6 | IDENT@[3; 7) "main" | ||
7 | PARAM_LIST@[7; 10) | ||
8 | L_PAREN@[7; 8) | ||
9 | R_PAREN@[8; 9) | ||
10 | WHITESPACE@[9; 10) | ||
11 | BLOCK_EXPR@[10; 35) | ||
12 | L_CURLY@[10; 11) | ||
13 | FN_ITEM@[11; 33) | ||
14 | ABI@[11; 23) | ||
15 | WHITESPACE@[11; 16) | ||
16 | EXTERN_KW@[16; 22) | ||
17 | WHITESPACE@[22; 23) | ||
18 | FN_KW@[23; 25) | ||
19 | NAME@[25; 27) | ||
20 | WHITESPACE@[25; 26) | ||
21 | IDENT@[26; 27) "f" | ||
22 | PARAM_LIST@[27; 30) | ||
23 | L_PAREN@[27; 28) | ||
24 | R_PAREN@[28; 29) | ||
25 | WHITESPACE@[29; 30) | ||
26 | BLOCK_EXPR@[30; 33) | ||
27 | L_CURLY@[30; 31) | ||
28 | R_CURLY@[31; 32) | ||
29 | WHITESPACE@[32; 33) | ||
30 | R_CURLY@[33; 34) | ||
31 | WHITESPACE@[34; 35) | ||
diff --git a/tests/data/parser/ok/0026_const_fn_in_block.rs b/tests/data/parser/ok/0026_const_fn_in_block.rs new file mode 100644 index 000000000..7641a3d28 --- /dev/null +++ b/tests/data/parser/ok/0026_const_fn_in_block.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | fn main() { | ||
2 | const fn f() {} | ||
3 | } | ||
diff --git a/tests/data/parser/ok/0026_const_fn_in_block.txt b/tests/data/parser/ok/0026_const_fn_in_block.txt new file mode 100644 index 000000000..329c65846 --- /dev/null +++ b/tests/data/parser/ok/0026_const_fn_in_block.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | FILE@[0; 34) | ||
2 | FN_ITEM@[0; 34) | ||
3 | FN_KW@[0; 2) | ||
4 | NAME@[2; 7) | ||
5 | WHITESPACE@[2; 3) | ||
6 | IDENT@[3; 7) "main" | ||
7 | PARAM_LIST@[7; 10) | ||
8 | L_PAREN@[7; 8) | ||
9 | R_PAREN@[8; 9) | ||
10 | WHITESPACE@[9; 10) | ||
11 | BLOCK_EXPR@[10; 34) | ||
12 | L_CURLY@[10; 11) | ||
13 | FN_ITEM@[11; 32) | ||
14 | WHITESPACE@[11; 16) | ||
15 | CONST_KW@[16; 21) | ||
16 | WHITESPACE@[21; 22) | ||
17 | FN_KW@[22; 24) | ||
18 | NAME@[24; 26) | ||
19 | WHITESPACE@[24; 25) | ||
20 | IDENT@[25; 26) "f" | ||
21 | PARAM_LIST@[26; 29) | ||
22 | L_PAREN@[26; 27) | ||
23 | R_PAREN@[27; 28) | ||
24 | WHITESPACE@[28; 29) | ||
25 | BLOCK_EXPR@[29; 32) | ||
26 | L_CURLY@[29; 30) | ||
27 | R_CURLY@[30; 31) | ||
28 | WHITESPACE@[31; 32) | ||
29 | R_CURLY@[32; 33) | ||
30 | WHITESPACE@[33; 34) | ||
diff --git a/tests/data/parser/ok/0027_unsafe_fn_in_block.rs b/tests/data/parser/ok/0027_unsafe_fn_in_block.rs new file mode 100644 index 000000000..f3c5ff938 --- /dev/null +++ b/tests/data/parser/ok/0027_unsafe_fn_in_block.rs | |||
@@ -0,0 +1,4 @@ | |||
1 | fn main() { | ||
2 | unsafe fn f() {} | ||
3 | unsafe { 92 } | ||
4 | } | ||
diff --git a/tests/data/parser/ok/0027_unsafe_fn_in_block.txt b/tests/data/parser/ok/0027_unsafe_fn_in_block.txt new file mode 100644 index 000000000..9982d0308 --- /dev/null +++ b/tests/data/parser/ok/0027_unsafe_fn_in_block.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | FILE@[0; 53) | ||
2 | FN_ITEM@[0; 53) | ||
3 | FN_KW@[0; 2) | ||
4 | NAME@[2; 7) | ||
5 | WHITESPACE@[2; 3) | ||
6 | IDENT@[3; 7) "main" | ||
7 | PARAM_LIST@[7; 10) | ||
8 | L_PAREN@[7; 8) | ||
9 | R_PAREN@[8; 9) | ||
10 | WHITESPACE@[9; 10) | ||
11 | BLOCK_EXPR@[10; 53) | ||
12 | L_CURLY@[10; 11) | ||
13 | FN_ITEM@[11; 37) | ||
14 | WHITESPACE@[11; 16) | ||
15 | UNSAFE_KW@[16; 22) | ||
16 | WHITESPACE@[22; 23) | ||
17 | FN_KW@[23; 25) | ||
18 | NAME@[25; 27) | ||
19 | WHITESPACE@[25; 26) | ||
20 | IDENT@[26; 27) "f" | ||
21 | PARAM_LIST@[27; 30) | ||
22 | L_PAREN@[27; 28) | ||
23 | R_PAREN@[28; 29) | ||
24 | WHITESPACE@[29; 30) | ||
25 | BLOCK_EXPR@[30; 37) | ||
26 | L_CURLY@[30; 31) | ||
27 | R_CURLY@[31; 32) | ||
28 | WHITESPACE@[32; 37) | ||
29 | BLOCK_EXPR@[37; 51) | ||
30 | UNSAFE_KW@[37; 43) | ||
31 | WHITESPACE@[43; 44) | ||
32 | L_CURLY@[44; 45) | ||
33 | LITERAL@[45; 49) | ||
34 | WHITESPACE@[45; 46) | ||
35 | INT_NUMBER@[46; 48) "92" | ||
36 | WHITESPACE@[48; 49) | ||
37 | R_CURLY@[49; 50) | ||
38 | WHITESPACE@[50; 51) | ||
39 | R_CURLY@[51; 52) | ||
40 | WHITESPACE@[52; 53) | ||
diff --git a/tests/testutils/src/lib.rs b/tests/testutils/src/lib.rs index deeb707d3..39c821661 100644 --- a/tests/testutils/src/lib.rs +++ b/tests/testutils/src/lib.rs | |||
@@ -90,6 +90,7 @@ fn print_difference(expected: &str, actual: &str, path: &Path) { | |||
90 | return; | 90 | return; |
91 | } | 91 | } |
92 | let changeset = Changeset::new(actual, expected, "\n"); | 92 | let changeset = Changeset::new(actual, expected, "\n"); |
93 | println!("Expected:\n{}\n\nActual:\n{}\n", expected, actual); | ||
93 | print!("{}", changeset); | 94 | print!("{}", changeset); |
94 | println!("file: {}\n", path.display()); | 95 | println!("file: {}\n", path.display()); |
95 | panic!("Comparison failed") | 96 | panic!("Comparison failed") |