aboutsummaryrefslogtreecommitdiff
path: root/test/behavior
diff options
context:
space:
mode:
authorDaniele Cocca <daniele.cocca@gmail.com>2021-07-16 01:33:46 +0100
committerAndrew Kelley <andrew@ziglang.org>2021-07-15 20:56:24 -0400
commit8cde0c91c6e95853a092ff8e00f92d804102a5dc (patch)
tree4b7c9528e488b10fed88e041c30e2bac007e9b97 /test/behavior
parentb009aca38a861f74fd5378db19c65db286ad397e (diff)
downloadzig-8cde0c91c6e95853a092ff8e00f92d804102a5dc.tar.gz
zig-8cde0c91c6e95853a092ff8e00f92d804102a5dc.zip
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.
Diffstat (limited to 'test/behavior')
-rw-r--r--test/behavior/bugs/3779.zig3
1 files changed, 3 insertions, 0 deletions
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
}