aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-11-30 00:13:07 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-11-30 00:13:07 -0700
commit902df103c6151c257c90de9ba5f29f7f4b9dbea2 (patch)
tree16a522f3c8bbe34b56038d4810bf2487e32e2d85 /doc
parent173d56213b60fc570b6ba3922ee1d40bbf0d0e36 (diff)
downloadzig-902df103c6151c257c90de9ba5f29f7f4b9dbea2.tar.gz
zig-902df103c6151c257c90de9ba5f29f7f4b9dbea2.zip
std lib API deprecations for the upcoming 0.9.0 release
See #3811
Diffstat (limited to 'doc')
-rw-r--r--doc/langref.html.in10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in
index 9e5edee9f8..89a9b16a2e 100644
--- a/doc/langref.html.in
+++ b/doc/langref.html.in
@@ -5708,7 +5708,7 @@ const mem = std.mem;
test "cast *[1][*]const u8 to [*]const ?[*]const u8" {
const window_name = [1][*]const u8{"window name"};
const x: [*]const ?[*]const u8 = &window_name;
- try expect(mem.eql(u8, std.mem.spanZ(@ptrCast([*:0]const u8, x[0].?)), "window name"));
+ try expect(mem.eql(u8, std.mem.sliceTo(@ptrCast([*:0]const u8, x[0].?), 0), "window name"));
}
{#code_end#}
{#header_close#}
@@ -7364,7 +7364,7 @@ fn amain() !void {
var global_download_frame: anyframe = undefined;
fn fetchUrl(allocator: *Allocator, url: []const u8) ![]u8 {
_ = url; // this is just an example, we don't actually do it!
- const result = try std.mem.dupe(allocator, u8, "this is the downloaded url contents");
+ const result = try allocator.dupe(u8, "this is the downloaded url contents");
errdefer allocator.free(result);
suspend {
global_download_frame = @frame();
@@ -7376,7 +7376,7 @@ fn fetchUrl(allocator: *Allocator, url: []const u8) ![]u8 {
var global_file_frame: anyframe = undefined;
fn readFile(allocator: *Allocator, filename: []const u8) ![]u8 {
_ = filename; // this is just an example, we don't actually do it!
- const result = try std.mem.dupe(allocator, u8, "this is the file contents");
+ const result = try allocator.dupe(u8, "this is the file contents");
errdefer allocator.free(result);
suspend {
global_file_frame = @frame();
@@ -7435,7 +7435,7 @@ fn amain() !void {
fn fetchUrl(allocator: *Allocator, url: []const u8) ![]u8 {
_ = url; // this is just an example, we don't actually do it!
- const result = try std.mem.dupe(allocator, u8, "this is the downloaded url contents");
+ const result = try allocator.dupe(u8, "this is the downloaded url contents");
errdefer allocator.free(result);
std.debug.print("fetchUrl returning\n", .{});
return result;
@@ -7443,7 +7443,7 @@ fn fetchUrl(allocator: *Allocator, url: []const u8) ![]u8 {
fn readFile(allocator: *Allocator, filename: []const u8) ![]u8 {
_ = filename; // this is just an example, we don't actually do it!
- const result = try std.mem.dupe(allocator, u8, "this is the file contents");
+ const result = try allocator.dupe(u8, "this is the file contents");
errdefer allocator.free(result);
std.debug.print("readFile returning\n", .{});
return result;