mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
auto merge of #14463 : SergioBenitez/rust/deprecation-fix, r=alexcrichton
The deprecation warning text for mem::move_val_init was incorrect. It should point users to `overwrite` instead of itself.
This commit is contained in:
commit
9659a50957
@ -160,9 +160,9 @@ pub unsafe fn overwrite<T>(dst: *mut T, src: T) {
|
|||||||
intrinsics::move_val_init(&mut *dst, src)
|
intrinsics::move_val_init(&mut *dst, src)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Deprecated, use move_val_init() instead
|
/// Deprecated, use `overwrite` instead
|
||||||
#[inline]
|
#[inline]
|
||||||
#[deprecated = "this function has been renamed to move_val_init()"]
|
#[deprecated = "this function has been renamed to `overwrite`"]
|
||||||
pub unsafe fn move_val_init<T>(dst: &mut T, src: T) {
|
pub unsafe fn move_val_init<T>(dst: &mut T, src: T) {
|
||||||
overwrite(dst, src)
|
overwrite(dst, src)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user