Commit 37bc6ee54a

Frank Denis <github@pureftpd.org>
2020-11-03 20:10:02
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
Changed files (1)
lib
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".*,