From 8cde0c91c6e95853a092ff8e00f92d804102a5dc Mon Sep 17 00:00:00 2001 From: Daniele Cocca Date: Fri, 16 Jul 2021 01:33:46 +0100 Subject: [PATCH] Fix "unused local constant" error Amends b009aca38a861f74fd5378db19c65db286ad397e. The PR predated the introduction of unused variable/constant checks, thus the build checks weren't reporting this failure until later when merged into master. --- test/behavior/bugs/3779.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/behavior/bugs/3779.zig b/test/behavior/bugs/3779.zig index 1019d90b6d..7f0be4dcf8 100644 --- a/test/behavior/bugs/3779.zig +++ b/test/behavior/bugs/3779.zig @@ -53,5 +53,8 @@ test "@src() returns a struct containing 0-terminated string slices" { try std.testing.expect(std.mem.endsWith(u8, src.fn_name, "testFnForSrc")); const ptr_src_file: [*:0]const u8 = src.file; + _ = ptr_src_file; // unused + const ptr_src_fn_name: [*:0]const u8 = src.fn_name; + _ = ptr_src_fn_name; // unused }