diff --git a/doc/langref.html.in b/doc/langref.html.in index 45b85abad8..61db4ed598 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -4531,7 +4531,7 @@ const mem = std.mem; test "cast *[1][*]const u8 to [*]const ?[*]const u8" { const window_name = [1][*]const u8{c"window name"}; const x: [*]const ?[*]const u8 = &window_name; - assert(mem.eql(u8, std.cstr.toSliceConst(x[0].?), "window name")); + assert(mem.eql(u8, std.mem.toSliceConst(u8, x[0].?), "window name")); } {#code_end#} {#header_close#} diff --git a/std/debug.zig b/std/debug.zig index b62bd5da64..e2f4a67755 100644 --- a/std/debug.zig +++ b/std/debug.zig @@ -85,6 +85,10 @@ fn wantTtyColor() bool { /// TODO multithreaded awareness pub fn dumpCurrentStackTrace(start_addr: ?usize) void { const stderr = getStderrStream() catch return; + if (os.wasi.is_the_target) { + stderr.print("Unable to dump stack trace: unimplemented on WASI\n") catch return; + return; + } const debug_info = getSelfDebugInfo() catch |err| { stderr.print("Unable to dump stack trace: Unable to open debug info: {}\n", @errorName(err)) catch return; return; @@ -147,6 +151,10 @@ pub fn captureStackTrace(first_address: ?usize, stack_trace: *builtin.StackTrace /// TODO multithreaded awareness pub fn dumpStackTrace(stack_trace: builtin.StackTrace) void { const stderr = getStderrStream() catch return; + if (os.wasi.is_the_target) { + stderr.print("Unable to dump stack trace: unimplemented on WASI\n") catch return; + return; + } const debug_info = getSelfDebugInfo() catch |err| { stderr.print("Unable to dump stack trace: Unable to open debug info: {}\n", @errorName(err)) catch return; return;