From 503302ceef7290027eedcc78c903be32fad90433 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 18 May 2023 14:32:52 -0700 Subject: [PATCH] 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. --- src/Module.zig | 2 +- test/cases/compile_errors/invalid_duplicate_test_decl_name.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module.zig b/src/Module.zig index 6d1a5acb09be..d87c86b86496 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -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); diff --git a/test/cases/compile_errors/invalid_duplicate_test_decl_name.zig b/test/cases/compile_errors/invalid_duplicate_test_decl_name.zig index e27bbe7c1a1c..c3ecdbf4fc92 100644 --- a/test/cases/compile_errors/invalid_duplicate_test_decl_name.zig +++ b/test/cases/compile_errors/invalid_duplicate_test_decl_name.zig @@ -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