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 1a90ad8 commit cc4653bCopy full SHA for cc4653b
compiler/rustc_middle/src/mir/interpret/allocation.rs
@@ -370,7 +370,7 @@ impl Allocation {
370
}
371
// Create allocation.
372
Ok(Allocation {
373
- bytes: AllocBytes::from_bytes(Cow::from(&*bytes), self.align),
+ bytes: AllocBytes::from_bytes(Cow::Owned(Vec::from(bytes)), self.align),
374
provenance: ProvenanceMap::from_presorted_ptrs(new_provenance),
375
init_mask: self.init_mask,
376
align: self.align,
0 commit comments