diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-04-28 15:06:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-28 15:06:18 -0400 |
| commit | 8facd99d41b1290f9b29ec22c9dcce680d972810 (patch) | |
| tree | 0ab61812da58df4127b8b56ec43eb88c0e6d5eb2 /lib/std/debug | |
| parent | d038676a1f46ecab2bd095d3503ab05bcd8de58c (diff) | |
| parent | 8be4511061f18e1bf2b6f7bf108482c6d1e30aa6 (diff) | |
| download | zig-8facd99d41b1290f9b29ec22c9dcce680d972810.tar.gz zig-8facd99d41b1290f9b29ec22c9dcce680d972810.zip | |
Merge pull request #23708 from ziglang/memmove-followups
`@memmove` followups
Diffstat (limited to 'lib/std/debug')
| -rw-r--r-- | lib/std/debug/no_panic.zig | 10 | ||||
| -rw-r--r-- | lib/std/debug/simple_panic.zig | 11 |
2 files changed, 9 insertions, 12 deletions
diff --git a/lib/std/debug/no_panic.zig b/lib/std/debug/no_panic.zig index ccecc89a87..0a4996097a 100644 --- a/lib/std/debug/no_panic.zig +++ b/lib/std/debug/no_panic.zig @@ -125,17 +125,15 @@ pub fn forLenMismatch() noreturn { @trap(); } -pub fn memcpyLenMismatch() noreturn { - @branchHint(.cold); - @trap(); -} +/// Delete after next zig1.wasm update +pub const memcpyLenMismatch = copyLenMismatch; -pub fn memcpyAlias() noreturn { +pub fn copyLenMismatch() noreturn { @branchHint(.cold); @trap(); } -pub fn memmoveLenMismatch() noreturn { +pub fn memcpyAlias() noreturn { @branchHint(.cold); @trap(); } diff --git a/lib/std/debug/simple_panic.zig b/lib/std/debug/simple_panic.zig index 724061021f..568f7de495 100644 --- a/lib/std/debug/simple_panic.zig +++ b/lib/std/debug/simple_panic.zig @@ -120,18 +120,17 @@ pub fn forLenMismatch() noreturn { call("for loop over objects with non-equal lengths", null); } -pub fn memcpyLenMismatch() noreturn { - call("@memcpy arguments have non-equal lengths", null); +/// Delete after next zig1.wasm update +pub const memcpyLenMismatch = copyLenMismatch; + +pub fn copyLenMismatch() noreturn { + call("source and destination have non-equal lengths", null); } pub fn memcpyAlias() noreturn { call("@memcpy arguments alias", null); } -pub fn memmoveLenMismatch() noreturn { - call("@memmove arguments have non-equal lengths", null); -} - pub fn noreturnReturned() noreturn { call("'noreturn' function returned", null); } |
