diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-03-25 16:32:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-25 16:32:18 -0700 |
| commit | 405502286d28baee4dc3a6152282d1e6fe6c6472 (patch) | |
| tree | 679088dc9e31d849582989a572a8685d9d7f2492 /lib/std/unicode.zig | |
| parent | abadad464090a897813e35539d669f707ea3a8b4 (diff) | |
| parent | f8b8259e5caf30bd87151a0dcad7867768930e6b (diff) | |
| download | zig-405502286d28baee4dc3a6152282d1e6fe6c6472.tar.gz zig-405502286d28baee4dc3a6152282d1e6fe6c6472.zip | |
Merge pull request #19414 from mlugg/comptime-mutable-memory-yet-again
compiler: implement analysis-local comptime-mutable memory
Diffstat (limited to 'lib/std/unicode.zig')
| -rw-r--r-- | lib/std/unicode.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/unicode.zig b/lib/std/unicode.zig index 8a26c3383e..9d1f52fb2d 100644 --- a/lib/std/unicode.zig +++ b/lib/std/unicode.zig @@ -1358,7 +1358,8 @@ pub fn utf8ToUtf16LeStringLiteral(comptime utf8: []const u8) *const [calcUtf16Le var utf16le: [len:0]u16 = [_:0]u16{0} ** len; const utf16le_len = utf8ToUtf16Le(&utf16le, utf8[0..]) catch |err| @compileError(err); assert(len == utf16le_len); - break :blk &utf16le; + const final = utf16le; + break :blk &final; }; } |
