aboutsummaryrefslogtreecommitdiff
path: root/lib/std/meta.zig
diff options
context:
space:
mode:
authorFrank Denis <github@pureftpd.org>2020-11-03 20:10:02 +0100
committerAndrew Kelley <andrew@ziglang.org>2020-11-03 16:52:51 -0500
commit37bc6ee54a388717095ab59959e5b0282d1ef8ef (patch)
tree5aefb928fcb34e56656b819a82e3020bd2939815 /lib/std/meta.zig
parentf2cb63c2e1a08db4ac29de3db1bf5b4d28a11e92 (diff)
downloadzig-37bc6ee54a388717095ab59959e5b0282d1ef8ef.tar.gz
zig-37bc6ee54a388717095ab59959e5b0282d1ef8ef.zip
std.meta: test that const and mut variables have different addresses
We are checking that two identical, constant values, are stored at different addresses. But sharing a unique location doesn't look like something the compiler wouldn't do. It may make more sense to check that a const variable and a mutable variable set to the same value have different addresses.
Diffstat (limited to 'lib/std/meta.zig')
-rw-r--r--lib/std/meta.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig
index 508e0590d6..4e03e1e60f 100644
--- a/lib/std/meta.zig
+++ b/lib/std/meta.zig
@@ -574,7 +574,7 @@ test "std.meta.eql" {
.c = "54321".*,
};
- const s_3 = S{
+ var s_3 = S{
.a = 134,
.b = 123.3,
.c = "12345".*,