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.
This commit is contained in:
Andrew Kelley 2023-05-18 14:32:52 -07:00
parent b9d2e0e308
commit 503302ceef
2 changed files with 2 additions and 2 deletions

View File

@ -5354,7 +5354,7 @@ fn scanDecl(iter: *ScanDeclIter, decl_sub_index: usize, flags: u4) Allocator.Err
const msg = try ErrorMsg.create(
gpa,
src_loc,
"found test declaration with duplicate name: {s}",
"duplicate test name: {s}",
.{decl_name},
);
errdefer msg.destroy(gpa);

View File

@ -6,5 +6,5 @@ test "thingy" {}
// target=native
// is_test=1
//
// :1:6: error: found test declaration with duplicate name: test.thingy
// :1:6: error: duplicate test name: test.thingy
// :2:6: note: other test here