authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-02-25 23:59:48-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-02-26 14:41:33-05:00
logf74a856d84af4c43057febc0a871caa0e69bbfc8
tree2d8085b7ee73aaabdce3a5f5fba5525de034e75f
parentc5aa680c88f7c03718460ff38e7cb1f7c5482cf2

reword deprecated error slightly

"found" -> "reached" to match "reached unreachable code"

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

src/Sema.zig+1-1
...@@ -1409,7 +1409,7 @@ fn analyzeBodyInner(...@@ -1409,7 +1409,7 @@ fn analyzeBodyInner(
1409 if (!mod.allow_deprecated) {1409 if (!mod.allow_deprecated) {
1410 const src_node: i32 = @bitCast(extended.operand);1410 const src_node: i32 = @bitCast(extended.operand);
1411 const src = block.nodeOffset(src_node);1411 const src = block.nodeOffset(src_node);
1412 return sema.fail(block, src, "found deprecated code", .{});1412 return sema.fail(block, src, "reached deprecated code", .{});
1413 }1413 }
14141414
1415 i += 1;1415 i += 1;
test/cases/compile_errors/deprecated.zig+1-1
...@@ -6,4 +6,4 @@ pub export fn foo() usize {...@@ -6,4 +6,4 @@ pub export fn foo() usize {
66
7// error7// error
8//8//
9// :1:13: error: found deprecated code9// :1:13: error: reached deprecated code
test/tests.zig+1-1
...@@ -1180,7 +1180,7 @@ pub fn addCliTests(b: *std.Build) *Step {...@@ -1180,7 +1180,7 @@ pub fn addCliTests(b: *std.Build) *Step {
1180 // Test `zig build -fallow-deprecated`.1180 // Test `zig build -fallow-deprecated`.
11811181
1182 const deprecated_check: std.Build.Step.Run.StdIo.Check = .{1182 const deprecated_check: std.Build.Step.Run.StdIo.Check = .{
1183 .expect_stderr_match = "found deprecated code",1183 .expect_stderr_match = "reached deprecated code",
1184 };1184 };
11851185
1186 const tmp_path = b.makeTempPath();1186 const tmp_path = b.makeTempPath();