Skip to content

Commit b197c4d

Browse files
authored
std.Atomic: remove unnecessary @ptrCast (#17825)
1 parent 5bd27a2 commit b197c4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/atomic/Atomic.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub fn Atomic(comptime T: type) type {
4646
extern "c" fn __tsan_release(addr: *anyopaque) void;
4747
};
4848

49-
const addr = @as(*anyopaque, @ptrCast(self));
49+
const addr: *anyopaque = self;
5050
return switch (ordering) {
5151
.Unordered, .Monotonic => @compileError(@tagName(ordering) ++ " only applies to atomic loads and stores"),
5252
.Acquire => tsan.__tsan_acquire(addr),

0 commit comments

Comments
 (0)