authorgravatar for 14938807+xackus@users.noreply.github.comxackus <14938807+xackus@users.noreply.github.com> 2020-11-12 03:13:19+01:00
committergravatar for 14938807+xackus@users.noreply.github.comxackus <14938807+xackus@users.noreply.github.com> 2020-11-14 13:59:29+01:00
logc814fdbfaf823093497b0d354de559422a3dfda5
treedbc04c2d845b7c1d8775b81585d73f98487124e1
parentbf03ae7acc2e8478958e46b2e418fcf29aa99128

std.mem: improve doc comments


1 files changed, 4 insertions(+), 3 deletions(-)

lib/std/mem.zig+4-3
......@@ -13,7 +13,8 @@ const meta = std.meta;
1313const trait = meta.trait;
1414const testing = std.testing;
1515
16/// https://github.com/ziglang/zig/issues/2564
16/// Compile time known minimum page size.
17/// https://github.com/ziglang/zig/issues/4082
1718pub const page_size = switch (builtin.arch) {
1819 .wasm32, .wasm64 => 64 * 1024,
1920 .aarch64 => switch (builtin.os.tag) {
......@@ -139,7 +140,7 @@ test "mem.Allocator basics" {
139140
140141/// Copy all of source into dest at position 0.
141142/// dest.len must be >= source.len.
142/// dest.ptr must be <= src.ptr.
143/// If the slices overlap, dest.ptr must be <= src.ptr.
143144pub fn copy(comptime T: type, dest: []T, source: []const T) void {
144145 // TODO instead of manually doing this check for the whole array
145146 // and turning off runtime safety, the compiler should detect loops like
......@@ -152,7 +153,7 @@ pub fn copy(comptime T: type, dest: []T, source: []const T) void {
152153
153154/// Copy all of source into dest at position 0.
154155/// dest.len must be >= source.len.
155/// dest.ptr must be >= src.ptr.
156/// If the slices overlap, dest.ptr must be >= src.ptr.
156157pub fn copyBackwards(comptime T: type, dest: []T, source: []const T) void {
157158 // TODO instead of manually doing this check for the whole array
158159 // and turning off runtime safety, the compiler should detect loops like