diff --git a/src/ir.cpp b/src/ir.cpp index 3835e7843..1bb5a7515 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -10421,25 +10421,6 @@ static IrInstruction *ir_analyze_cast(IrAnalyze *ira, IrInstruction *source_inst } } - // cast from *const [N]T to []const T - if (is_slice(wanted_type) && - actual_type->id == ZigTypeIdPointer && - actual_type->data.pointer.is_const && - actual_type->data.pointer.child_type->id == ZigTypeIdArray) - { - ZigType *ptr_type = wanted_type->data.structure.fields[slice_ptr_index].type_entry; - assert(ptr_type->id == ZigTypeIdPointer); - - ZigType *array_type = actual_type->data.pointer.child_type; - - if ((ptr_type->data.pointer.is_const || array_type->data.array.len == 0) && - types_match_const_cast_only(ira, ptr_type->data.pointer.child_type, array_type->data.array.child_type, - source_node, false).id == ConstCastResultIdOk) - { - return ir_analyze_array_to_slice(ira, source_instr, value, wanted_type); - } - } - // cast from [N]T to ?[]const T if (wanted_type->id == ZigTypeIdOptional && is_slice(wanted_type->data.maybe.child_type) &&