Skip to content

Fix references to zero_memory and copy_memory in ptr docs #45616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
/// moves the value out of `src` without preventing further usage of `src`.
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
/// `src` is not used before the data is overwritten again (e.g. with `write`,
/// `zero_memory`, or `copy_memory`). Note that `*src = foo` counts as a use
/// `write_bytes`, or `copy`). Note that `*src = foo` counts as a use
/// because it will attempt to drop the value previously at `*src`.
///
/// The pointer must be aligned; use `read_unaligned` if that is not the case.
Expand Down Expand Up @@ -264,7 +264,7 @@ pub unsafe fn read<T>(src: *const T) -> T {
/// moves the value out of `src` without preventing further usage of `src`.
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
/// `src` is not used before the data is overwritten again (e.g. with `write`,
/// `zero_memory`, or `copy_memory`). Note that `*src = foo` counts as a use
/// `write_bytes`, or `copy`). Note that `*src = foo` counts as a use
/// because it will attempt to drop the value previously at `*src`.
///
/// # Examples
Expand Down Expand Up @@ -397,7 +397,7 @@ pub unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
/// moves the value out of `src` without preventing further usage of `src`.
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
/// `src` is not used before the data is overwritten again (e.g. with `write`,
/// `zero_memory`, or `copy_memory`). Note that `*src = foo` counts as a use
/// `write_bytes`, or `copy`). Note that `*src = foo` counts as a use
/// because it will attempt to drop the value previously at `*src`.
///
/// # Examples
Expand Down Expand Up @@ -871,7 +871,7 @@ impl<T: ?Sized> *const T {
/// moves the value out of `self` without preventing further usage of `self`.
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
/// `self` is not used before the data is overwritten again (e.g. with `write`,
/// `zero_memory`, or `copy_memory`). Note that `*self = foo` counts as a use
/// `write_bytes`, or `copy`). Note that `*self = foo` counts as a use
/// because it will attempt to drop the value previously at `*self`.
///
/// The pointer must be aligned; use `read_unaligned` if that is not the case.
Expand Down Expand Up @@ -925,7 +925,7 @@ impl<T: ?Sized> *const T {
/// moves the value out of `self` without preventing further usage of `self`.
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
/// `self` is not used before the data is overwritten again (e.g. with `write`,
/// `zero_memory`, or `copy_memory`). Note that `*self = foo` counts as a use
/// `write_bytes`, or `copy`). Note that `*self = foo` counts as a use
/// because it will attempt to drop the value previously at `*self`.
///
/// # Examples
Expand Down Expand Up @@ -961,7 +961,7 @@ impl<T: ?Sized> *const T {
/// moves the value out of `self` without preventing further usage of `self`.
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
/// `self` is not used before the data is overwritten again (e.g. with `write`,
/// `zero_memory`, or `copy_memory`). Note that `*self = foo` counts as a use
/// `write_bytes`, or `copy`). Note that `*self = foo` counts as a use
/// because it will attempt to drop the value previously at `*self`.
///
/// # Examples
Expand Down Expand Up @@ -1569,7 +1569,7 @@ impl<T: ?Sized> *mut T {
/// moves the value out of `self` without preventing further usage of `self`.
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
/// `self` is not used before the data is overwritten again (e.g. with `write`,
/// `zero_memory`, or `copy_memory`). Note that `*self = foo` counts as a use
/// `write_bytes`, or `copy`). Note that `*self = foo` counts as a use
/// because it will attempt to drop the value previously at `*self`.
///
/// The pointer must be aligned; use `read_unaligned` if that is not the case.
Expand Down Expand Up @@ -1623,7 +1623,7 @@ impl<T: ?Sized> *mut T {
/// moves the value out of `self` without preventing further usage of `self`.
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
/// `src` is not used before the data is overwritten again (e.g. with `write`,
/// `zero_memory`, or `copy_memory`). Note that `*self = foo` counts as a use
/// `write_bytes`, or `copy`). Note that `*self = foo` counts as a use
/// because it will attempt to drop the value previously at `*self`.
///
/// # Examples
Expand Down Expand Up @@ -1659,7 +1659,7 @@ impl<T: ?Sized> *mut T {
/// moves the value out of `self` without preventing further usage of `self`.
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
/// `self` is not used before the data is overwritten again (e.g. with `write`,
/// `zero_memory`, or `copy_memory`). Note that `*self = foo` counts as a use
/// `write_bytes`, or `copy`). Note that `*self = foo` counts as a use
/// because it will attempt to drop the value previously at `*self`.
///
/// # Examples
Expand Down