std.Atomic: remove unnecessary @ptrCast (#17825)

This commit is contained in:
XXIV
2023-11-03 21:55:02 +03:00
committed by GitHub
parent 5bd27a2cb6
commit b197c4d79b

View File

@@ -46,7 +46,7 @@ pub fn Atomic(comptime T: type) type {
extern "c" fn __tsan_release(addr: *anyopaque) void;
};
const addr = @as(*anyopaque, @ptrCast(self));
const addr: *anyopaque = self;
return switch (ordering) {
.Unordered, .Monotonic => @compileError(@tagName(ordering) ++ " only applies to atomic loads and stores"),
.Acquire => tsan.__tsan_acquire(addr),