mirror of
https://github.com/Noratrieb/vechonk.git
synced 2026-01-14 16:45:10 +01:00
strict provenance, lol
This commit is contained in:
parent
f033557c51
commit
c71158bcf5
2 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
#![cfg_attr(not(test), no_std)]
|
#![cfg_attr(not(test), no_std)]
|
||||||
#![feature(ptr_metadata)]
|
#![feature(ptr_metadata, strict_provenance)]
|
||||||
#![feature(unsize)]
|
#![feature(unsize)]
|
||||||
#![deny(unsafe_op_in_unsafe_fn)]
|
#![deny(unsafe_op_in_unsafe_fn)]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ impl<T: ?Sized> RawVechonk<T> {
|
||||||
// SAFETY: The value has no size, so it's ok for it to be dangling around
|
// SAFETY: The value has no size, so it's ok for it to be dangling around
|
||||||
return unsafe {
|
return unsafe {
|
||||||
Box::from_raw(ptr::from_raw_parts_mut::<T>(
|
Box::from_raw(ptr::from_raw_parts_mut::<T>(
|
||||||
mem::align_of_val(elem_fat_ref) as *mut (),
|
ptr::invalid::<()>(mem::align_of_val(elem_fat_ref)) as *mut (),
|
||||||
data.meta,
|
data.meta,
|
||||||
))
|
))
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue