aboutsummaryrefslogtreecommitdiff
path: root/lib/std/mem.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-09-08 03:59:38 -0700
committerGitHub <noreply@github.com>2025-09-08 03:59:38 -0700
commit05cff8a558fda0e974ea7d00f26f8f4ff6e1195f (patch)
treec99a4d2366532e5937ca7f944eb0008601a4edce /lib/std/mem.zig
parent426d65d700012b27ffa652258554032f171ad77d (diff)
parent7666d5fc2653023670f6e61b6d19b0ba15750d67 (diff)
downloadzig-05cff8a558fda0e974ea7d00f26f8f4ff6e1195f.tar.gz
zig-05cff8a558fda0e974ea7d00f26f8f4ff6e1195f.zip
Merge pull request #25186 from ziglang/vector-memory-coercion
frontend: vectors and arrays no longer support in-memory coercion
Diffstat (limited to 'lib/std/mem.zig')
-rw-r--r--lib/std/mem.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/mem.zig b/lib/std/mem.zig
index e31e93aae1..8ca34aa51c 100644
--- a/lib/std/mem.zig
+++ b/lib/std/mem.zig
@@ -1156,10 +1156,10 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co
}
}
- assert(std.mem.isAligned(@intFromPtr(&p[i]), block_size));
+ std.debug.assertAligned(&p[i], .fromByteUnits(block_size));
while (true) {
- const block: *const Block = @ptrCast(@alignCast(p[i..][0..block_len]));
- const matches = block.* == mask;
+ const block: Block = p[i..][0..block_len].*;
+ const matches = block == mask;
if (@reduce(.Or, matches)) {
return i + std.simd.firstTrue(matches).?;
}