We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47e2cc2 commit 235770cCopy full SHA for 235770c
compiler/rustc_middle/src/mir/interpret/allocation.rs
@@ -371,7 +371,7 @@ impl Allocation {
371
}
372
// Create allocation.
373
Ok(Allocation {
374
- bytes: AllocBytes::from_bytes(Cow::from(&*bytes), self.align),
+ bytes: AllocBytes::from_bytes(Cow::Owned(Vec::from(bytes)), self.align),
375
provenance: ProvenanceMap::from_presorted_ptrs(new_provenance),
376
init_mask: self.init_mask,
377
align: self.align,
0 commit comments