diff options
| -rw-r--r-- | compiler/rustc_middle/src/mir/interpret/allocation.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/interpret/allocation.rs b/compiler/rustc_middle/src/mir/interpret/allocation.rs index a503c86c59b..ada6e097766 100644 --- a/compiler/rustc_middle/src/mir/interpret/allocation.rs +++ b/compiler/rustc_middle/src/mir/interpret/allocation.rs @@ -147,7 +147,7 @@ impl<Tag> Allocation<Tag> { })?; // SAFETY: This turns a Box<[MaybeUninit<u8>]> into a Vec<u8>. This is safe since the box // was zero-allocated which is a valid value for u8. - let bytes = unsafe { bytes.assume_init().to_vec() }; + let bytes = unsafe { bytes.assume_init().into_vec() }; Ok(Allocation { bytes, relocations: Relocations::new(), |
