Stores a new value in an object without running the object's destructor.
unsafe extern "rust-intrinsic" fn move_val_init<T>(dst: *mut T, src: T) -> ()
| Name | Description |
|---|---|
| dst | The location where |
| src | The value to store in |
This can be used to initialize memory that was previously created with uninit.
unsafe fn f(x: T) {
let mut y = uninit():
move_val_init(&mut y, x);
}