upgrade zig bultins to zig 13

This commit is contained in:
Luke Boswell 2024-07-28 16:50:45 +10:00
parent c08202507b
commit c47915a691
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
2 changed files with 2 additions and 9 deletions

View file

@ -1,7 +0,0 @@
// This is a glue package that just re-exports other libs useful for zig hosts.
// Long term, a slimmed down version of these libraries without all of the roc builtins should be create via `roc glue`.
// We also should make RocList use comptime types in order to make it nice to use in zig.
pub const dec = @import("dec.zig");
pub const list = @import("list.zig");
pub const str = @import("str.zig");

View file

@ -652,7 +652,7 @@ pub fn listDropAt(
}
if (list.isUnique()) {
var i = drop_index;
const i = drop_index;
const copy_target = source_ptr;
const copy_source = copy_target + element_width;
std.mem.copyForwards(u8, copy_target[i..size], copy_source[i..size]);
@ -982,7 +982,7 @@ inline fn listReplaceInPlaceHelp(
copy: CopyFn,
) RocList {
// the element we will replace
var element_at_index = (list.bytes orelse unreachable) + (index * element_width);
const element_at_index = (list.bytes orelse unreachable) + (index * element_width);
// copy out the old element
copy((out_element orelse unreachable), element_at_index);