Skip to content

Commit f74a856

Browse files
committed
reword deprecated error slightly
"found" -> "reached" to match "reached unreachable code"
1 parent c5aa680 commit f74a856

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Sema.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ fn analyzeBodyInner(
14091409
if (!mod.allow_deprecated) {
14101410
const src_node: i32 = @bitCast(extended.operand);
14111411
const src = block.nodeOffset(src_node);
1412-
return sema.fail(block, src, "found deprecated code", .{});
1412+
return sema.fail(block, src, "reached deprecated code", .{});
14131413
}
14141414

14151415
i += 1;

test/cases/compile_errors/deprecated.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ pub export fn foo() usize {
66

77
// error
88
//
9-
// :1:13: error: found deprecated code
9+
// :1:13: error: reached deprecated code

test/tests.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ pub fn addCliTests(b: *std.Build) *Step {
11801180
// Test `zig build -fallow-deprecated`.
11811181

11821182
const deprecated_check: std.Build.Step.Run.StdIo.Check = .{
1183-
.expect_stderr_match = "found deprecated code",
1183+
.expect_stderr_match = "reached deprecated code",
11841184
};
11851185

11861186
const tmp_path = b.makeTempPath();

0 commit comments

Comments
 (0)