authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-05-18 14:32:52-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-05-18 19:17:04-07:00
log503302ceef7290027eedcc78c903be32fad90433
tree87d9e953fa2fd4861b6467960f68ad6de334289d
parentb9d2e0e308794463db1b1acf04d76778c470a070

Sema: simplify "duplicate test name" error message

* Avoid redundant words ("found") - All compile errors are found by the compiler * Avoid unnecessary prepositions ("with") - There is a grammatically correct alternate word order without the preposition.

2 files changed, 2 insertions(+), 2 deletions(-)

src/Module.zig+1-1
...@@ -5354,7 +5354,7 @@ fn scanDecl(iter: *ScanDeclIter, decl_sub_index: usize, flags: u4) Allocator.Err...@@ -5354,7 +5354,7 @@ fn scanDecl(iter: *ScanDeclIter, decl_sub_index: usize, flags: u4) Allocator.Err
5354 const msg = try ErrorMsg.create(5354 const msg = try ErrorMsg.create(
5355 gpa,5355 gpa,
5356 src_loc,5356 src_loc,
5357 "found test declaration with duplicate name: {s}",5357 "duplicate test name: {s}",
5358 .{decl_name},5358 .{decl_name},
5359 );5359 );
5360 errdefer msg.destroy(gpa);5360 errdefer msg.destroy(gpa);
test/cases/compile_errors/invalid_duplicate_test_decl_name.zig+1-1
...@@ -6,5 +6,5 @@ test "thingy" {}...@@ -6,5 +6,5 @@ test "thingy" {}
6// target=native6// target=native
7// is_test=17// is_test=1
8//8//
9// :1:6: error: found test declaration with duplicate name: test.thingy9// :1:6: error: duplicate test name: test.thingy
10// :2:6: note: other test here10// :2:6: note: other test here