standard library fixes
This commit is contained in:
parent
1aafbae5be
commit
a430853a48
@ -10215,7 +10215,7 @@ static IrInstruction *ir_analyze_cast(IrAnalyze *ira, IrInstruction *source_inst
|
||||
}
|
||||
}
|
||||
|
||||
// explicit cast from [N]T to &const []const N
|
||||
// explicit cast from [N]T to &const []const T
|
||||
if (wanted_type->id == TypeTableEntryIdPointer &&
|
||||
wanted_type->data.pointer.is_const &&
|
||||
is_slice(wanted_type->data.pointer.child_type) &&
|
||||
|
@ -79,7 +79,7 @@ pub const NullTerminated2DArray = struct {
|
||||
errdefer allocator.free(buf);
|
||||
|
||||
var write_index = index_size;
|
||||
const index_buf = ([]?[*]u8)(buf);
|
||||
const index_buf = @bytesToSlice(?[*]u8, buf);
|
||||
|
||||
var i: usize = 0;
|
||||
for (slices) |slice| {
|
||||
|
@ -1805,7 +1805,7 @@ pub fn argsAlloc(allocator: *mem.Allocator) ![]const []u8 {
|
||||
const buf = try allocator.alignedAlloc(u8, @alignOf([]u8), total_bytes);
|
||||
errdefer allocator.free(buf);
|
||||
|
||||
const result_slice_list = ([][]u8)(buf[0..slice_list_bytes]);
|
||||
const result_slice_list = @bytesToSlice([]u8, buf[0..slice_list_bytes]);
|
||||
const result_contents = buf[slice_list_bytes..];
|
||||
mem.copy(u8, result_contents, contents_slice);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user