support creating mutable allocations from byte slices
This commit is contained in:
parent
c3005e85da
commit
585141b219
8 changed files with 30 additions and 15 deletions
|
@ -169,8 +169,9 @@ pub(super) fn op_to_const<'tcx>(
|
|||
(ecx.tcx.global_alloc(ptr.alloc_id).unwrap_memory(), ptr.offset.bytes())
|
||||
}
|
||||
Scalar::Int { .. } => (
|
||||
ecx.tcx
|
||||
.intern_const_alloc(Allocation::from_byte_aligned_bytes(b"" as &[u8])),
|
||||
ecx.tcx.intern_const_alloc(Allocation::from_bytes_byte_aligned_immutable(
|
||||
b"" as &[u8],
|
||||
)),
|
||||
0,
|
||||
),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue