From 1da93caced5511d5b2d666fe40c5db108580e2aa Mon Sep 17 00:00:00 2001 From: Marc Tiehuis Date: Sat, 18 Aug 2018 12:06:25 +1200 Subject: [PATCH] docs: correct @memcpy, @memset function signatures --- doc/langref.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 761cd7212..d8da0de1c 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -5528,7 +5528,7 @@ fn add(a: i32, b: i32) i32 { return a + b; }

Returns the field type of a struct or union.

{#header_close#} {#header_open|@memcpy#} -
@memcpy(noalias dest: *u8, noalias source: *const u8, byte_count: usize)
+
@memcpy(noalias dest: [*]u8, noalias source: [*]const u8, byte_count: usize)

This function copies bytes from one region of memory to another. dest and source are both pointers and must not overlap. @@ -5546,7 +5546,7 @@ fn add(a: i32, b: i32) i32 { return a + b; } mem.copy(u8, dest[0...byte_count], source[0...byte_count]); {#header_close#} {#header_open|@memset#} -

@memset(dest: *u8, c: u8, byte_count: usize)
+
@memset(dest: [*]u8, c: u8, byte_count: usize)

This function sets a region of memory to c. dest is a pointer.