From 9818193b3102c984cf9f9e2c05ddb75fd43ef111 Mon Sep 17 00:00:00 2001 From: "Victor M. Alvarez" Date: Tue, 10 Dec 2024 16:15:43 +0100 Subject: [PATCH] tests: fix broken tests after upgrading the `annotate-snippets` crate. --- lib/src/compiler/tests/testdata/errors/1.out | 2 +- lib/src/compiler/tests/testdata/errors/113.out | 5 +++-- lib/src/compiler/tests/testdata/errors/114.out | 5 +++-- lib/src/compiler/tests/testdata/errors/128.out | 2 +- lib/src/compiler/tests/testdata/errors/2.out | 5 +++-- lib/src/compiler/tests/testdata/errors/31.out | 5 +++-- lib/src/compiler/tests/testdata/errors/32.out | 5 +++-- lib/src/compiler/tests/testdata/errors/33.out | 5 +++-- lib/src/compiler/tests/testdata/errors/34.out | 5 +++-- lib/src/compiler/tests/testdata/errors/42.out | 5 +++-- lib/src/compiler/tests/testdata/errors/46.out | 6 ++++-- lib/src/compiler/tests/testdata/errors/47.out | 5 +++-- lib/src/compiler/tests/testdata/errors/48.out | 5 +++-- lib/src/compiler/tests/testdata/errors/50.out | 5 +++-- lib/src/compiler/tests/testdata/errors/51.out | 5 +++-- lib/src/compiler/tests/testdata/errors/52.out | 5 +++-- lib/src/compiler/tests/testdata/warnings/11.out | 5 +++-- lib/src/compiler/tests/testdata/warnings/13.out | 2 +- lib/src/compiler/tests/testdata/warnings/3.out | 5 +++-- lib/src/compiler/tests/testdata/warnings/34.out | 12 ++++++++---- lib/src/compiler/tests/testdata/warnings/4.out | 5 +++-- lib/src/compiler/tests/testdata/warnings/5.out | 5 +++-- lib/src/compiler/tests/testdata/warnings/7.out | 5 +++-- lib/src/compiler/tests/testdata/warnings/8.out | 5 +++-- lib/src/compiler/tests/testdata/warnings/9.out | 5 +++-- 25 files changed, 75 insertions(+), 49 deletions(-) diff --git a/lib/src/compiler/tests/testdata/errors/1.out b/lib/src/compiler/tests/testdata/errors/1.out index 19ebd92b9..6e539f361 100644 --- a/lib/src/compiler/tests/testdata/errors/1.out +++ b/lib/src/compiler/tests/testdata/errors/1.out @@ -5,7 +5,7 @@ error[E012]: duplicate rule `test` | ---- note: `test` declared here for the first time 2 | condition: true 3 | } -4 | +4 | 5 | rule test { | ^^^^ duplicate declaration of `test` | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/113.out b/lib/src/compiler/tests/testdata/errors/113.out index c54bbbe81..0dff294cd 100644 --- a/lib/src/compiler/tests/testdata/errors/113.out +++ b/lib/src/compiler/tests/testdata/errors/113.out @@ -2,7 +2,8 @@ error[E019]: invalid modifier combination: `xor` `nocase` --> line:3:16 | 3 | $a = "foo" xor nocase - | ^^^ `xor` modifier used here - | ^^^^^^ `nocase` modifier used here + | ^^^ ^^^^^^ `nocase` modifier used here + | | + | `xor` modifier used here | = note: these two modifiers can't be used together \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/114.out b/lib/src/compiler/tests/testdata/errors/114.out index 9c51c8b64..58ccc7b1e 100644 --- a/lib/src/compiler/tests/testdata/errors/114.out +++ b/lib/src/compiler/tests/testdata/errors/114.out @@ -2,7 +2,8 @@ error[E019]: invalid modifier combination: `base64wide` `nocase` --> line:3:29 | 3 | $a = "foo" nocase ascii base64wide - | ^^^^^^^^^^ `base64wide` modifier used here - | ^^^^^^ `nocase` modifier used here + | ^^^^^^ ^^^^^^^^^^ `base64wide` modifier used here + | | + | `nocase` modifier used here | = note: these two modifiers can't be used together \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/128.out b/lib/src/compiler/tests/testdata/errors/128.out index 879e18bac..2e66c883c 100644 --- a/lib/src/compiler/tests/testdata/errors/128.out +++ b/lib/src/compiler/tests/testdata/errors/128.out @@ -2,7 +2,7 @@ error[E001]: syntax error --> line:1:1 | 1 | / /*/ -2 | | +2 | | 3 | | rule test { condition: true } | |_____________________________^ expecting import statement or rule definition | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/2.out b/lib/src/compiler/tests/testdata/errors/2.out index 1ed45802b..139e26c75 100644 --- a/lib/src/compiler/tests/testdata/errors/2.out +++ b/lib/src/compiler/tests/testdata/errors/2.out @@ -2,6 +2,7 @@ error[E003]: mismatching types --> line:3:4 | 3 | "foo" == 2 - | ^^^^^ this expression is `string` - | ^ this expression is `integer` + | ^^^^^ ^ this expression is `integer` + | | + | this expression is `string` | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/31.out b/lib/src/compiler/tests/testdata/errors/31.out index ecf90b559..8a84c4dc9 100644 --- a/lib/src/compiler/tests/testdata/errors/31.out +++ b/lib/src/compiler/tests/testdata/errors/31.out @@ -2,6 +2,7 @@ error[E003]: mismatching types --> line:3:20 | 3 | for 1 n in (1, 2, "3") : ( - | ^ this expression is `integer` - | ^^^ this expression is `string` + | ^ ^^^ this expression is `string` + | | + | this expression is `integer` | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/32.out b/lib/src/compiler/tests/testdata/errors/32.out index 67d3924c5..67da7ac22 100644 --- a/lib/src/compiler/tests/testdata/errors/32.out +++ b/lib/src/compiler/tests/testdata/errors/32.out @@ -2,6 +2,7 @@ error[E003]: mismatching types --> line:4:7 | 4 | n == "3" - | ^ this expression is `integer` - | ^^^ this expression is `string` + | ^ ^^^ this expression is `string` + | | + | this expression is `integer` | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/33.out b/lib/src/compiler/tests/testdata/errors/33.out index 61bd812d2..a5a2d50b8 100644 --- a/lib/src/compiler/tests/testdata/errors/33.out +++ b/lib/src/compiler/tests/testdata/errors/33.out @@ -2,6 +2,7 @@ error[E005]: assignment mismatch --> line:3:13 | 3 | for all x,y in (0..10) : ( true ) - | ^^^ this expects 2 value(s) - | ^^^^^^^ this produces 1 value(s) + | ^^^ ^^^^^^^ this produces 1 value(s) + | | + | this expects 2 value(s) | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/34.out b/lib/src/compiler/tests/testdata/errors/34.out index 21a481c39..187efef87 100644 --- a/lib/src/compiler/tests/testdata/errors/34.out +++ b/lib/src/compiler/tests/testdata/errors/34.out @@ -2,6 +2,7 @@ error[E005]: assignment mismatch --> line:3:13 | 3 | for all x,y in (1, 2, 3) : ( true ) - | ^^^ this expects 2 value(s) - | ^^^^^^^ this produces 1 value(s) + | ^^^ ^^^^^^^ this produces 1 value(s) + | | + | this expects 2 value(s) | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/42.out b/lib/src/compiler/tests/testdata/errors/42.out index 9ea4968d2..3997a3d7d 100644 --- a/lib/src/compiler/tests/testdata/errors/42.out +++ b/lib/src/compiler/tests/testdata/errors/42.out @@ -2,6 +2,7 @@ error[E015]: mixing greedy and non-greedy quantifiers in regular expression --> line:3:15 | 3 | $a = /a.*b.*?c/ - | ^^^ this is non-greedy - | ^^ this is greedy + | ^^ ^^^ this is non-greedy + | | + | this is greedy | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/46.out b/lib/src/compiler/tests/testdata/errors/46.out index a8ce46ff5..6a0563d6c 100644 --- a/lib/src/compiler/tests/testdata/errors/46.out +++ b/lib/src/compiler/tests/testdata/errors/46.out @@ -2,6 +2,8 @@ error[E017]: `entrypoint` is unsupported --> line:3:5 | 3 | entrypoint == 0x1000 - | ^^^^^^^^^^ the `entrypoint` keyword is not supported anymore - | ---------- help: use `pe.entry_point` or `elf.entry_point` or `macho.entry_point` + | ---------- + | | + | the `entrypoint` keyword is not supported anymore + | help: use `pe.entry_point` or `elf.entry_point` or `macho.entry_point` | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/47.out b/lib/src/compiler/tests/testdata/errors/47.out index 88fe4d85a..b18704d1d 100644 --- a/lib/src/compiler/tests/testdata/errors/47.out +++ b/lib/src/compiler/tests/testdata/errors/47.out @@ -2,6 +2,7 @@ error[E005]: assignment mismatch --> line:4:13 | 4 | for all x,y in test_proto2.array_int64 : ( true ) - | ^^^ this expects 2 value(s) - | ^^^^^^^^^^^^^^^^^^^^^^^ this produces 1 value(s) + | ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ this produces 1 value(s) + | | + | this expects 2 value(s) | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/48.out b/lib/src/compiler/tests/testdata/errors/48.out index 218a38728..e0bfd087d 100644 --- a/lib/src/compiler/tests/testdata/errors/48.out +++ b/lib/src/compiler/tests/testdata/errors/48.out @@ -2,6 +2,7 @@ error[E005]: assignment mismatch --> line:4:13 | 4 | for all x in test_proto2.map_string_int64 : ( true ) - | ^ this expects 1 value(s) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this produces 2 value(s) + | ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this produces 2 value(s) + | | + | this expects 1 value(s) | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/50.out b/lib/src/compiler/tests/testdata/errors/50.out index e655f634d..deaf4410e 100644 --- a/lib/src/compiler/tests/testdata/errors/50.out +++ b/lib/src/compiler/tests/testdata/errors/50.out @@ -2,6 +2,7 @@ error[E003]: mismatching types --> line:4:53 | 4 | for all k,v in test_proto2.map_int64_string : ( k == "1" ) - | ^ this expression is `integer` - | ^^^ this expression is `string` + | ^ ^^^ this expression is `string` + | | + | this expression is `integer` | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/51.out b/lib/src/compiler/tests/testdata/errors/51.out index 9ac4bc29c..a131f8cea 100644 --- a/lib/src/compiler/tests/testdata/errors/51.out +++ b/lib/src/compiler/tests/testdata/errors/51.out @@ -2,6 +2,7 @@ error[E003]: mismatching types --> line:4:53 | 4 | for all k,v in test_proto2.map_int64_string : ( v == 1 ) - | ^ this expression is `string` - | ^ this expression is `integer` + | ^ ^ this expression is `integer` + | | + | this expression is `string` | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/errors/52.out b/lib/src/compiler/tests/testdata/errors/52.out index ea1be7719..0f75c8566 100644 --- a/lib/src/compiler/tests/testdata/errors/52.out +++ b/lib/src/compiler/tests/testdata/errors/52.out @@ -2,6 +2,7 @@ error[E003]: mismatching types --> line:5:8 | 5 | struct.nested_int64_zero == "0" - | ^^^^^^^^^^^^^^^^^^^^^^^^ this expression is `integer` - | ^^^ this expression is `string` + | ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ this expression is `string` + | | + | this expression is `integer` | \ No newline at end of file diff --git a/lib/src/compiler/tests/testdata/warnings/11.out b/lib/src/compiler/tests/testdata/warnings/11.out index dc943c470..91db1a659 100644 --- a/lib/src/compiler/tests/testdata/warnings/11.out +++ b/lib/src/compiler/tests/testdata/warnings/11.out @@ -2,6 +2,7 @@ warning[redundant_modifier]: redundant case-insensitive modifier --> line:3:15 | 3 | $a = /foo/i nocase - | - the `i` suffix indicates that the pattern is case-insensitive - | ------ the `nocase` modifier does the same + | - ------ the `nocase` modifier does the same + | | + | the `i` suffix indicates that the pattern is case-insensitive | diff --git a/lib/src/compiler/tests/testdata/warnings/13.out b/lib/src/compiler/tests/testdata/warnings/13.out index 98197a5f1..5df6c6a34 100644 --- a/lib/src/compiler/tests/testdata/warnings/13.out +++ b/lib/src/compiler/tests/testdata/warnings/13.out @@ -1,5 +1,5 @@ warning[duplicate_import]: duplicate import statement - --> line:1:21 + --> line:2:1 | 1 | import "test_proto2" | -------------------- note: `test_proto2` imported here for the first time diff --git a/lib/src/compiler/tests/testdata/warnings/3.out b/lib/src/compiler/tests/testdata/warnings/3.out index 2e9e73e25..d71814801 100644 --- a/lib/src/compiler/tests/testdata/warnings/3.out +++ b/lib/src/compiler/tests/testdata/warnings/3.out @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression --> line:6:5 | 6 | all of them at 0 - | --- this implies that multiple patterns must match - | ---- but they must match at the same offset + | --- ---- but they must match at the same offset + | | + | this implies that multiple patterns must match | diff --git a/lib/src/compiler/tests/testdata/warnings/34.out b/lib/src/compiler/tests/testdata/warnings/34.out index e69d11451..83c08a930 100644 --- a/lib/src/compiler/tests/testdata/warnings/34.out +++ b/lib/src/compiler/tests/testdata/warnings/34.out @@ -2,13 +2,17 @@ warning[text_as_hex]: hex pattern could be written as text literal --> line:3:5 | 3 | $aaa = { 61 61 61 } - | ----------------- this pattern can be written as a text literal - | ----------------- help: replace with "aaa" + | ----------------- + | | + | this pattern can be written as a text literal + | help: replace with "aaa" | warning[text_as_hex]: hex pattern could be written as text literal --> line:10:5 | 10 | $aaa = { 61 09 62 } - | ----------------- this pattern can be written as a text literal - | ----------------- help: replace with "a\tb" + | ----------------- + | | + | this pattern can be written as a text literal + | help: replace with "a\tb" | diff --git a/lib/src/compiler/tests/testdata/warnings/4.out b/lib/src/compiler/tests/testdata/warnings/4.out index 381df653f..0b09c9d47 100644 --- a/lib/src/compiler/tests/testdata/warnings/4.out +++ b/lib/src/compiler/tests/testdata/warnings/4.out @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression --> line:6:5 | 6 | all of ($*) at 0 - | --- this implies that multiple patterns must match - | ---- but they must match at the same offset + | --- ---- but they must match at the same offset + | | + | this implies that multiple patterns must match | diff --git a/lib/src/compiler/tests/testdata/warnings/5.out b/lib/src/compiler/tests/testdata/warnings/5.out index 381df653f..0b09c9d47 100644 --- a/lib/src/compiler/tests/testdata/warnings/5.out +++ b/lib/src/compiler/tests/testdata/warnings/5.out @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression --> line:6:5 | 6 | all of ($*) at 0 - | --- this implies that multiple patterns must match - | ---- but they must match at the same offset + | --- ---- but they must match at the same offset + | | + | this implies that multiple patterns must match | diff --git a/lib/src/compiler/tests/testdata/warnings/7.out b/lib/src/compiler/tests/testdata/warnings/7.out index 2e9e73e25..d71814801 100644 --- a/lib/src/compiler/tests/testdata/warnings/7.out +++ b/lib/src/compiler/tests/testdata/warnings/7.out @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression --> line:6:5 | 6 | all of them at 0 - | --- this implies that multiple patterns must match - | ---- but they must match at the same offset + | --- ---- but they must match at the same offset + | | + | this implies that multiple patterns must match | diff --git a/lib/src/compiler/tests/testdata/warnings/8.out b/lib/src/compiler/tests/testdata/warnings/8.out index 381df653f..0b09c9d47 100644 --- a/lib/src/compiler/tests/testdata/warnings/8.out +++ b/lib/src/compiler/tests/testdata/warnings/8.out @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression --> line:6:5 | 6 | all of ($*) at 0 - | --- this implies that multiple patterns must match - | ---- but they must match at the same offset + | --- ---- but they must match at the same offset + | | + | this implies that multiple patterns must match | diff --git a/lib/src/compiler/tests/testdata/warnings/9.out b/lib/src/compiler/tests/testdata/warnings/9.out index 5d29f95fa..bd5cb9060 100644 --- a/lib/src/compiler/tests/testdata/warnings/9.out +++ b/lib/src/compiler/tests/testdata/warnings/9.out @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression --> line:6:5 | 6 | 2 of ($*) at 0 - | - this implies that multiple patterns must match - | ---- but they must match at the same offset + | - ---- but they must match at the same offset + | | + | this implies that multiple patterns must match |