Skip to content

Commit 9659a50

Browse files
committed
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.
2 parents 24b1ce1 + ac833da commit 9659a50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/mem.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ pub unsafe fn overwrite<T>(dst: *mut T, src: T) {
160160
intrinsics::move_val_init(&mut *dst, src)
161161
}
162162

163-
/// Deprecated, use move_val_init() instead
163+
/// Deprecated, use `overwrite` instead
164164
#[inline]
165-
#[deprecated = "this function has been renamed to move_val_init()"]
165+
#[deprecated = "this function has been renamed to `overwrite`"]
166166
pub unsafe fn move_val_init<T>(dst: &mut T, src: T) {
167167
overwrite(dst, src)
168168
}

0 commit comments

Comments
 (0)