We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fa8429 commit ae8c473Copy full SHA for ae8c473
src/constant.rs
@@ -210,8 +210,7 @@ pub(crate) fn codegen_const_value<'tcx>(
210
.offset_i64(fx, i64::try_from(offset.bytes()).unwrap()),
211
layout,
212
),
213
- ConstValue::Slice { data, meta } => {
214
- let alloc_id = fx.tcx.reserve_and_set_memory_alloc(data);
+ ConstValue::Slice { alloc_id, meta, phantom: _ } => {
215
let ptr = pointer_for_allocation(fx, alloc_id).get_addr(fx);
216
let len = fx.bcx.ins().iconst(fx.pointer_type, meta as i64);
217
CValue::by_val_pair(ptr, len, layout)
0 commit comments