Auto merge of #129831 - matthiaskrgr:rollup-befq6zx, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - #128523 (Add release notes for 1.81.0) - #129605 (Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen) - #129650 (Clean up `library/profiler_builtins/build.rs`) - #129651 (skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set) - #129684 (Enable Miri to pass pointers through FFI) - #129762 (Update the `wasm-component-ld` binary dependency) - #129782 (couple more crash tests) - #129816 (tidy: say which feature gate has a stability issue mismatch) - #129818 (make the const-unstable-in-stable error more clear) - #129824 (Fix code examples buttons not appearing on click on mobile) - #129826 (library: Fix typo in `core::mem`) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
@@ -358,10 +358,11 @@ impl Allocation {
|
||||
pub fn adjust_from_tcx<Prov: Provenance, Bytes: AllocBytes, Err>(
|
||||
&self,
|
||||
cx: &impl HasDataLayout,
|
||||
mut alloc_bytes: impl FnMut(&[u8], Align) -> Result<Bytes, Err>,
|
||||
mut adjust_ptr: impl FnMut(Pointer<CtfeProvenance>) -> Result<Pointer<Prov>, Err>,
|
||||
) -> Result<Allocation<Prov, (), Bytes>, Err> {
|
||||
// Copy the data.
|
||||
let mut bytes = Bytes::from_bytes(Cow::Borrowed(&*self.bytes), self.align);
|
||||
let mut bytes = alloc_bytes(&*self.bytes, self.align)?;
|
||||
// Adjust provenance of pointers stored in this allocation.
|
||||
let mut new_provenance = Vec::with_capacity(self.provenance.ptrs().len());
|
||||
let ptr_size = cx.data_layout().pointer_size.bytes_usize();
|
||||
|
||||
Reference in New Issue
Block a user