Skip to content

Commit 37bc6ee

Browse files
jedisct1andrewrk
authored andcommitted
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 parent f2cb63c commit 37bc6ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/meta.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ test "std.meta.eql" {
574574
.c = "54321".*,
575575
};
576576

577-
const s_3 = S{
577+
var s_3 = S{
578578
.a = 134,
579579
.b = 123.3,
580580
.c = "12345".*,

0 commit comments

Comments
 (0)