diff --git a/lib/std/mem.zig b/lib/std/mem.zig index 4c198408b5..a6c4fe90be 100644 --- a/lib/std/mem.zig +++ b/lib/std/mem.zig @@ -232,6 +232,7 @@ test "Allocator alloc and remap with zero-bit type" { /// Copy all of source into dest at position 0. /// dest.len must be >= source.len. /// If the slices overlap, dest.ptr must be <= src.ptr. +/// This function is deprecated; use @memmove instead. pub fn copyForwards(comptime T: type, dest: []T, source: []const T) void { for (dest[0..source.len], source) |*d, s| d.* = s; } @@ -239,6 +240,7 @@ pub fn copyForwards(comptime T: type, dest: []T, source: []const T) void { /// Copy all of source into dest at position 0. /// dest.len must be >= source.len. /// If the slices overlap, dest.ptr must be >= src.ptr. +/// This function is deprecated; use @memmove instead. pub fn copyBackwards(comptime T: type, dest: []T, source: []const T) void { // TODO instead of manually doing this check for the whole array // and turning off runtime safety, the compiler should detect loops like