Skip to content

Commit cad9377

Browse files
committed
Update nightly usage for set_ptr metadata
1 parent c3841fd commit cad9377

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

without-alloc/src/alloc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ pub trait LocalAllocLeakExt<'alloc>: LocalAlloc<'alloc> {
236236
core::ptr::copy(val as *const _ as *const u8, uninit.as_ptr() as *mut u8, layout.size());
237237
}
238238

239-
let ptr = val as *const _ as *const T;
240-
let ptr = ptr.set_ptr_value(uninit.as_ptr() as *const u8) as *mut T;
239+
let ptr = val as *const _ as *mut T;
240+
let ptr = uninit.as_ptr().with_metadata_of(ptr);
241241
Some(unsafe {
242242
// SAFETY: The byte copy above put the value into a valid state. Caller promises that
243243
// we can logically move the value.

0 commit comments

Comments
 (0)