aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-08-04 23:14:54 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-08-05 09:56:02 -0700
commit6f545683f3d53917df816ca6cd5c9c20474071f3 (patch)
tree1ad7438ccb144ea3739cfb452027150e322494ea /src/Sema.zig
parent82961a8c9f66c03b7f1a802d2d47d26bf0af7dca (diff)
downloadzig-6f545683f3d53917df816ca6cd5c9c20474071f3.tar.gz
zig-6f545683f3d53917df816ca6cd5c9c20474071f3.zip
std: replace various mem copies with `@memmove`
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 29c8daa8b3..5816990eb2 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -2631,7 +2631,7 @@ fn reparentOwnedErrorMsg(
const orig_notes = msg.notes.len;
msg.notes = try sema.gpa.realloc(msg.notes, orig_notes + 1);
- std.mem.copyBackwards(Zcu.ErrorMsg, msg.notes[1..], msg.notes[0..orig_notes]);
+ @memmove(msg.notes[1..][0..orig_notes], msg.notes[0..orig_notes]);
msg.notes[0] = .{
.src_loc = msg.src_loc,
.msg = msg.msg,
@@ -14464,8 +14464,8 @@ fn analyzeTupleMul(
}
}
for (0..factor) |i| {
- mem.copyForwards(InternPool.Index, types[tuple_len * i ..], types[0..tuple_len]);
- mem.copyForwards(InternPool.Index, values[tuple_len * i ..], values[0..tuple_len]);
+ @memmove(types[tuple_len * i ..][0..tuple_len], types[0..tuple_len]);
+ @memmove(values[tuple_len * i ..][0..tuple_len], values[0..tuple_len]);
}
break :rs runtime_src;
};