about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-06-03 11:38:09 -0700
committerbors <bors@rust-lang.org>2013-06-03 11:38:09 -0700
commit5ddbc881c52a111da2e61772ec5f7b2826f3d9cb (patch)
treeaacb2186374fb9485104e24a5b984e9b310b30f9 /src/libstd
parent4f6285fbf9001bd593e5424cc0f7de5609d8db55 (diff)
parente900dba28a1ff1434e037c48da2e99948333a564 (diff)
downloadrust-5ddbc881c52a111da2e61772ec5f7b2826f3d9cb.tar.gz
rust-5ddbc881c52a111da2e61772ec5f7b2826f3d9cb.zip
auto merge of #6913 : thestinger/rust/ptr, r=graydon
Closes #6607

I went with `RawPtr` instead of `UnsafePtr` because not all of these operations are `unsafe`, so to me it makes more sense to refer to it as a "raw" (not wrapped/abstracted) pointer. If we decide on something else in #6608 it can be renamed again.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/pipes.rs2
-rw-r--r--src/libstd/prelude.rs2
-rw-r--r--src/libstd/ptr.rs6
-rw-r--r--src/libstd/rt/mod.rs2
-rw-r--r--src/libstd/rt/stack.rs2
-rw-r--r--src/libstd/rt/uv/mod.rs2
-rw-r--r--src/libstd/str.rs2
-rw-r--r--src/libstd/vec.rs2
8 files changed, 10 insertions, 10 deletions
diff --git a/src/libstd/pipes.rs b/src/libstd/pipes.rs
index 365e192da66..fe1b834813e 100644
--- a/src/libstd/pipes.rs
+++ b/src/libstd/pipes.rs
@@ -94,7 +94,7 @@ use option::{None, Option, Some};
 use unstable::finally::Finally;
 use unstable::intrinsics;
 use ptr;
-use ptr::Ptr;
+use ptr::RawPtr;
 use task;
 use vec;
 use vec::OwnedVector;
diff --git a/src/libstd/prelude.rs b/src/libstd/prelude.rs
index 87430e3390a..b883f752e3c 100644
--- a/src/libstd/prelude.rs
+++ b/src/libstd/prelude.rs
@@ -43,7 +43,7 @@ pub use path::GenericPath;
 pub use path::Path;
 pub use path::PosixPath;
 pub use path::WindowsPath;
-pub use ptr::Ptr;
+pub use ptr::RawPtr;
 pub use ascii::{Ascii, AsciiCast, OwnedAsciiCast, AsciiStr};
 pub use str::{StrVector, StrSlice, OwnedStr, StrUtil};
 pub use from_str::{FromStr};
diff --git a/src/libstd/ptr.rs b/src/libstd/ptr.rs
index 1d9a9b9be36..c656a3eef62 100644
--- a/src/libstd/ptr.rs
+++ b/src/libstd/ptr.rs
@@ -296,7 +296,7 @@ pub unsafe fn array_each<T>(arr: **T, cb: &fn(*T)) {
 }
 
 #[allow(missing_doc)]
-pub trait Ptr<T> {
+pub trait RawPtr<T> {
     fn is_null(&const self) -> bool;
     fn is_not_null(&const self) -> bool;
     unsafe fn to_option(&const self) -> Option<&T>;
@@ -304,7 +304,7 @@ pub trait Ptr<T> {
 }
 
 /// Extension methods for immutable pointers
-impl<T> Ptr<T> for *T {
+impl<T> RawPtr<T> for *T {
     /// Returns true if the pointer is equal to the null pointer.
     #[inline(always)]
     fn is_null(&const self) -> bool { is_null(*self) }
@@ -336,7 +336,7 @@ impl<T> Ptr<T> for *T {
 }
 
 /// Extension methods for mutable pointers
-impl<T> Ptr<T> for *mut T {
+impl<T> RawPtr<T> for *mut T {
     /// Returns true if the pointer is equal to the null pointer.
     #[inline(always)]
     fn is_null(&const self) -> bool { is_null(*self) }
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs
index 2fac1df01a4..f6017b92807 100644
--- a/src/libstd/rt/mod.rs
+++ b/src/libstd/rt/mod.rs
@@ -56,7 +56,7 @@ Several modules in `core` are clients of `rt`:
 
 #[doc(hidden)];
 
-use ptr::Ptr;
+use ptr::RawPtr;
 
 /// The global (exchange) heap.
 pub mod global_heap;
diff --git a/src/libstd/rt/stack.rs b/src/libstd/rt/stack.rs
index fa4b8f30f4e..b0e87a62c8b 100644
--- a/src/libstd/rt/stack.rs
+++ b/src/libstd/rt/stack.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use container::Container;
-use ptr::Ptr;
+use ptr::RawPtr;
 use vec;
 use ops::Drop;
 use libc::{c_uint, uintptr_t};
diff --git a/src/libstd/rt/uv/mod.rs b/src/libstd/rt/uv/mod.rs
index bc968fc3d60..84d1e65454f 100644
--- a/src/libstd/rt/uv/mod.rs
+++ b/src/libstd/rt/uv/mod.rs
@@ -38,7 +38,7 @@ use container::Container;
 use option::*;
 use str::raw::from_c_str;
 use to_str::ToStr;
-use ptr::Ptr;
+use ptr::RawPtr;
 use libc;
 use vec;
 use ptr;
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index 961d93823ad..b7de9e20559 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -30,7 +30,7 @@ use libc;
 use option::{None, Option, Some};
 use old_iter::{BaseIter, EqIter};
 use ptr;
-use ptr::Ptr;
+use ptr::RawPtr;
 use str;
 use to_str::ToStr;
 use uint;
diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs
index b748ca54cf4..255dc1c95f7 100644
--- a/src/libstd/vec.rs
+++ b/src/libstd/vec.rs
@@ -26,7 +26,7 @@ use old_iter::CopyableIter;
 use option::{None, Option, Some};
 use ptr::to_unsafe_ptr;
 use ptr;
-use ptr::Ptr;
+use ptr::RawPtr;
 use sys;
 use uint;
 use unstable::intrinsics;