We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83b01b9 commit f408d4bCopy full SHA for f408d4b
compiler/rustc_middle/src/mir/interpret/allocation.rs
@@ -147,7 +147,7 @@ impl<Tag> Allocation<Tag> {
147
})?;
148
// SAFETY: This turns a Box<[MaybeUninit<u8>]> into a Vec<u8>. This is safe since the box
149
// was zero-allocated which is a valid value for u8.
150
- let bytes = unsafe { bytes.assume_init().to_vec() };
+ let bytes = unsafe { bytes.assume_init().into_vec() };
151
Ok(Allocation {
152
bytes,
153
relocations: Relocations::new(),
0 commit comments