add write_box_via_move intrinsic and use it for vec!

This allows us to get rid of box_new entirely
This commit is contained in:
Ralf Jung 2025-10-26 11:04:37 +01:00
parent 0eca6c0058
commit db5ed68a88

View file

@ -622,11 +622,6 @@ impl<T: ?Sized> Deref for Box<T> {
}
}
#[lang = "exchange_malloc"]
unsafe fn allocate(size: usize, _align: usize) -> *mut u8 {
unsafe { libc::malloc(size) }
}
#[lang = "drop"]
pub trait Drop {
fn drop(&mut self);