summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-06-02 19:16:40 -0400
committerDaniel Micay <danielmicay@gmail.com>2013-06-02 19:24:33 -0400
commit454133127a78e14ae4922d96579f1d1a433fa54c (patch)
treef9e28067580663eecced78d9d101404567487ec2 /src/libstd/rt
parent077ca799418b291f45ccba072aedab4daeace057 (diff)
downloadrust-454133127a78e14ae4922d96579f1d1a433fa54c.tar.gz
rust-454133127a78e14ae4922d96579f1d1a433fa54c.zip
ptr: split out borrowed pointer utilities
The ptr module is intended to be for raw pointers.

Closes #3111
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/task.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs
index eb7282bae05..620efed99ca 100644
--- a/src/libstd/rt/task.rs
+++ b/src/libstd/rt/task.rs
@@ -13,6 +13,7 @@
 //! local storage, and logging. Even a 'freestanding' Rust would likely want
 //! to implement this.
 
+use borrow;
 use cast::transmute;
 use libc::{c_void, uintptr_t};
 use ptr;
@@ -64,7 +65,7 @@ impl Task {
         // This is just an assertion that `run` was called unsafely
         // and this instance of Task is still accessible.
         do Local::borrow::<Task> |task| {
-            assert!(ptr::ref_eq(task, self));
+            assert!(borrow::ref_eq(task, self));
         }
 
         match self.unwinder {
@@ -89,7 +90,7 @@ impl Task {
         // This is just an assertion that `destroy` was called unsafely
         // and this instance of Task is still accessible.
         do Local::borrow::<Task> |task| {
-            assert!(ptr::ref_eq(task, self));
+            assert!(borrow::ref_eq(task, self));
         }
         match self.storage {
             LocalStorage(ptr, Some(ref dtor)) => {