commit f74a856d84af4c43057febc0a871caa0e69bbfc8 (tree)
parent c5aa680c88f7c03718460ff38e7cb1f7c5482cf2
Author: Andrew Kelley <andrew@ziglang.org>
Date: Tue, 25 Feb 2025 23:59:48 -0800
reword deprecated error slightly
"found" -> "reached" to match "reached unreachable code"
Diffstat:
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Sema.zig b/src/Sema.zig
@@ -1409,7 +1409,7 @@ fn analyzeBodyInner(
if (!mod.allow_deprecated) {
const src_node: i32 = @bitCast(extended.operand);
const src = block.nodeOffset(src_node);
- return sema.fail(block, src, "found deprecated code", .{});
+ return sema.fail(block, src, "reached deprecated code", .{});
}
i += 1;
diff --git a/test/cases/compile_errors/deprecated.zig b/test/cases/compile_errors/deprecated.zig
@@ -6,4 +6,4 @@ pub export fn foo() usize {
// error
//
-// :1:13: error: found deprecated code
+// :1:13: error: reached deprecated code
diff --git a/test/tests.zig b/test/tests.zig
@@ -1180,7 +1180,7 @@ pub fn addCliTests(b: *std.Build) *Step {
// Test `zig build -fallow-deprecated`.
const deprecated_check: std.Build.Step.Run.StdIo.Check = .{
- .expect_stderr_match = "found deprecated code",
+ .expect_stderr_match = "reached deprecated code",
};
const tmp_path = b.makeTempPath();