From 454133127a78e14ae4922d96579f1d1a433fa54c Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 2 Jun 2013 19:16:40 -0400 Subject: ptr: split out borrowed pointer utilities The ptr module is intended to be for raw pointers. Closes #3111 --- src/libstd/rt/task.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libstd/rt/task.rs') 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| { - 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| { - assert!(ptr::ref_eq(task, self)); + assert!(borrow::ref_eq(task, self)); } match self.storage { LocalStorage(ptr, Some(ref dtor)) => { -- cgit 1.4.1-3-g733a5