mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
std.Atomic: remove unnecessary @ptrCast (#17825)
This commit is contained in:
parent
5bd27a2cb6
commit
b197c4d79b
@ -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),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user