aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/struct.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behavior/struct.zig')
-rw-r--r--test/behavior/struct.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/behavior/struct.zig b/test/behavior/struct.zig
index 6686c911a5..6ced42998e 100644
--- a/test/behavior/struct.zig
+++ b/test/behavior/struct.zig
@@ -838,7 +838,7 @@ test "non-packed struct with u128 entry in union" {
var sx: S = undefined;
var s = &sx;
- try expect(@ptrToInt(&s.f2) - @ptrToInt(&s.f1) == @offsetOf(S, "f2"));
+ try expect(@intFromPtr(&s.f2) - @intFromPtr(&s.f1) == @offsetOf(S, "f2"));
var v2 = U{ .Num = 123 };
s.f2 = v2;
try expect(s.f2.Num == 123);