authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2020-11-03 20:10:02+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-11-03 16:52:51-05:00
log37bc6ee54a388717095ab59959e5b0282d1ef8ef
tree5aefb928fcb34e56656b819a82e3020bd2939815
parentf2cb63c2e1a08db4ac29de3db1bf5b4d28a11e92

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.

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

lib/std/meta.zig+1-1
...@@ -574,7 +574,7 @@ test "std.meta.eql" {...@@ -574,7 +574,7 @@ test "std.meta.eql" {
574 .c = "54321".*,574 .c = "54321".*,
575 };575 };
576576
577 const s_3 = S{577 var s_3 = S{
578 .a = 134,578 .a = 134,
579 .b = 123.3,579 .b = 123.3,
580 .c = "12345".*,580 .c = "12345".*,