diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-06-10 22:07:10 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-06-10 22:07:10 +0530 |
| commit | 7d9427e6cd798e24b4be633aa4bf459bd232400c (patch) | |
| tree | 55d99b6696147318e487ac6af8005865b89daaae /src/libcore | |
| parent | ef089ff70daad26f848efbe89bf1a1d1c1e7226d (diff) | |
| parent | 2c75256c151774407e5f4a0e4c655604d34bee17 (diff) | |
| download | rust-7d9427e6cd798e24b4be633aa4bf459bd232400c.tar.gz rust-7d9427e6cd798e24b4be633aa4bf459bd232400c.zip | |
Rollup merge of #26146 - steveklabnik:remove_unsafe_pointer, r=Gankro
Using two terms for one thing is confusing, these are called 'raw pointers' today.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/intrinsics.rs | 2 | ||||
| -rw-r--r-- | src/libcore/marker.rs | 2 | ||||
| -rw-r--r-- | src/libcore/ptr.rs | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 16094f2e6cc..774f86563d7 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -46,7 +46,7 @@ use marker::Sized; extern "rust-intrinsic" { - // NB: These intrinsics take unsafe pointers because they mutate aliased + // NB: These intrinsics take raw pointers because they mutate aliased // memory, which is not valid for either `&` or `&mut`. pub fn atomic_cxchg<T>(dst: *mut T, old: T, src: T) -> T; diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index bc0f3045972..7c20722b26d 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -357,7 +357,7 @@ macro_rules! impls{ /// struct is dropped, it may in turn drop one or more instances of /// the type `T`, though that may not be apparent from the other /// structure of the type itself. This is commonly necessary if the -/// structure is using an unsafe pointer like `*mut T` whose referent +/// structure is using a raw pointer like `*mut T` whose referent /// may be dropped when the type is dropped, as a `*mut T` is /// otherwise not treated as owned. /// diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 47c029f11b3..9ca9b4fc46c 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -10,16 +10,16 @@ // FIXME: talk about offset, copy_memory, copy_nonoverlapping_memory -//! Operations on unsafe pointers, `*const T`, and `*mut T`. +//! Operations on raw pointers, `*const T`, and `*mut T`. //! -//! Working with unsafe pointers in Rust is uncommon, +//! Working with raw pointers in Rust is uncommon, //! typically limited to a few patterns. //! //! Use the `null` function to create null pointers, and the `is_null` method //! of the `*const T` type to check for null. The `*const T` type also defines //! the `offset` method, for pointer math. //! -//! # Common ways to create unsafe pointers +//! # Common ways to create raw pointers //! //! ## 1. Coerce a reference (`&T`) or mutable reference (`&mut T`). //! @@ -86,7 +86,7 @@ //! //! Usually you wouldn't literally use `malloc` and `free` from Rust, //! but C APIs hand out a lot of pointers generally, so are a common source -//! of unsafe pointers in Rust. +//! of raw pointers in Rust. #![stable(feature = "rust1", since = "1.0.0")] #![doc(primitive = "pointer")] |
