From 2e722ec54b3503e2b2f411959fffb63ef9f1a334 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 29 May 2019 10:12:08 +0300 Subject: show error offsets in tests --- .../data/parser/inline/err/0001_array_type_missing_semi.txt | 10 +++++----- .../tests/data/parser/inline/err/0002_misplaced_label_err.txt | 8 ++++---- .../data/parser/inline/err/0003_pointer_type_no_mutability.txt | 2 +- .../ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt | 8 ++++---- .../data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt | 10 +++++----- .../tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt | 4 ++-- .../data/parser/inline/err/0007_async_without_semicolon.txt | 2 +- .../ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt | 2 +- .../data/parser/inline/err/0009_attr_on_expr_not_allowed.txt | 4 ++-- .../tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt | 6 +++--- .../tests/data/parser/inline/err/0010_wrong_order_fns.txt | 4 ++-- 11 files changed, 30 insertions(+), 30 deletions(-) (limited to 'crates/ra_syntax/tests/data/parser/inline') diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt b/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt index eb6d98fcd..3f0f1b480 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt @@ -20,8 +20,8 @@ SOURCE_FILE@[0; 18) ERROR@[16; 17) SEMI@[16; 17) ";" WHITESPACE@[17; 18) "\n" -err: `expected `;` or `]`` -err: `expected SEMI` -err: `expected an item` -err: `expected an item` -err: `expected an item` +error 12: expected `;` or `]` +error 12: expected SEMI +error 13: expected an item +error 15: expected an item +error 16: expected an item diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt b/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt index b1d104bd4..7abc49d5e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt @@ -22,7 +22,7 @@ SOURCE_FILE@[0; 30) WHITESPACE@[27; 28) "\n" R_CURLY@[28; 29) "}" WHITESPACE@[29; 30) "\n" -err: `expected a loop` -err: `expected SEMI` -err: `expected type` -err: `expected `{`` +error 22: expected a loop +error 22: expected SEMI +error 27: expected type +error 27: expected `{` diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt b/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt index b470d9ad1..b97e339bb 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt @@ -14,4 +14,4 @@ SOURCE_FILE@[0; 14) R_PAREN@[11; 12) ")" SEMI@[12; 13) ";" WHITESPACE@[13; 14) "\n" -err: `expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)` +error 10: expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate) diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt b/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt index ef4e0d5dd..43321b1ed 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt @@ -73,7 +73,7 @@ SOURCE_FILE@[0; 87) L_CURLY@[84; 85) "{" R_CURLY@[85; 86) "}" WHITESPACE@[86; 87) "\n" -err: `expected trait or type` -err: `expected `{`` -err: `expected trait or type` -err: `expected `{`` +error 38: expected trait or type +error 38: expected `{` +error 70: expected trait or type +error 70: expected `{` diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt b/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt index 41e623b41..451f29d39 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt @@ -16,8 +16,8 @@ SOURCE_FILE@[0; 20) ERROR@[18; 19) SEMI@[18; 19) ";" WHITESPACE@[19; 20) "\n" -err: `expected `fn`` -err: `expected SEMI` -err: `expected an item` -err: `expected an item` -err: `expected an item` +error 15: expected `fn` +error 15: expected SEMI +error 16: expected an item +error 17: expected an item +error 18: expected an item diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt b/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt index f1d0dd5c6..a1871ec08 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt @@ -31,5 +31,5 @@ SOURCE_FILE@[0; 33) L_CURLY@[30; 31) "{" R_CURLY@[31; 32) "}" WHITESPACE@[32; 33) "\n" -err: `expected an item` -err: `expected an item` +error 11: expected an item +error 18: expected an item diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt b/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt index 1a8fa029c..f70adc25d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt @@ -28,4 +28,4 @@ SOURCE_FILE@[0; 30) WHITESPACE@[27; 28) " " R_CURLY@[28; 29) "}" WHITESPACE@[29; 30) "\n" -err: `expected SEMI` +error 27: expected SEMI diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt b/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt index cadbbc078..1dbfca698 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt @@ -22,4 +22,4 @@ SOURCE_FILE@[0; 21) WHITESPACE@[18; 19) " " R_CURLY@[19; 20) "}" WHITESPACE@[20; 21) "\n" -err: `expected an item` +error 14: expected an item diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt b/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt index 8e7d7d241..338776a72 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt @@ -51,5 +51,5 @@ SOURCE_FILE@[0; 48) WHITESPACE@[45; 46) "\n" R_CURLY@[46; 47) "}" WHITESPACE@[47; 48) "\n" -err: `attributes are not allowed on BIN_EXPR` -err: `attributes are not allowed on IF_EXPR` +error 24: attributes are not allowed on BIN_EXPR +error 44: attributes are not allowed on IF_EXPR diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt b/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt index 36717439e..a21b29c80 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt @@ -46,6 +46,6 @@ SOURCE_FILE@[0; 47) WHITESPACE@[44; 45) "\n" R_CURLY@[45; 46) "}" WHITESPACE@[46; 47) "\n" -err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix` -err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix` -err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix` +error [17; 19): Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix +error [27; 31): Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix +error [39; 43): Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt b/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt index 5f39e7238..9eb4c9b36 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt @@ -35,5 +35,5 @@ SOURCE_FILE@[0; 50) L_CURLY@[47; 48) "{" R_CURLY@[48; 49) "}" WHITESPACE@[49; 50) "\n" -err: `expected fn, trait or impl` -err: `expected fn, trait or impl` +error 5: expected fn, trait or impl +error 31: expected fn, trait or impl -- cgit v1.2.3