From d32363266968c0259c3ec2065c5dd7b6fc85b152 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 7 Jan 2014 18:49:13 -0800 Subject: 'borrowed pointer' -> 'reference' --- src/libstd/borrow.rs | 2 +- src/libstd/cast.rs | 4 ++-- src/libstd/clone.rs | 2 +- src/libstd/lib.rs | 2 +- src/libstd/vec.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/borrow.rs b/src/libstd/borrow.rs index e8eda39537c..66df4334adc 100644 --- a/src/libstd/borrow.rs +++ b/src/libstd/borrow.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! Borrowed pointer utilities +//! Utilities for references #[cfg(not(test))] use prelude::*; diff --git a/src/libstd/cast.rs b/src/libstd/cast.rs index 05aab2f9570..eec7d28e134 100644 --- a/src/libstd/cast.rs +++ b/src/libstd/cast.rs @@ -64,7 +64,7 @@ pub unsafe fn transmute(thing: L) -> G { #[inline] pub unsafe fn transmute_mut<'a,T>(ptr: &'a T) -> &'a mut T { transmute(ptr) } -/// Coerce a borrowed pointer to have an arbitrary associated region. +/// Coerce a reference to have an arbitrary associated region. #[inline] pub unsafe fn transmute_region<'a,'b,T>(ptr: &'a T) -> &'b T { transmute(ptr) @@ -82,7 +82,7 @@ pub unsafe fn transmute_immut_unsafe>(ptr: P) -> *T { transmute(ptr) } -/// Coerce a borrowed mutable pointer to have an arbitrary associated region. +/// Coerce a mutable reference to have an arbitrary associated region. #[inline] pub unsafe fn transmute_mut_region<'a,'b,T>(ptr: &'a mut T) -> &'b mut T { transmute(ptr) diff --git a/src/libstd/clone.rs b/src/libstd/clone.rs index b26ceb799a7..e5e79b4386a 100644 --- a/src/libstd/clone.rs +++ b/src/libstd/clone.rs @@ -59,7 +59,7 @@ impl Clone for @T { } impl<'a, T> Clone for &'a T { - /// Return a shallow copy of the borrowed pointer. + /// Return a shallow copy of the reference. #[inline] fn clone(&self) -> &'a T { *self } } diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 492059ebb70..112a380c243 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -18,7 +18,7 @@ //! `std` includes modules corresponding to each of the integer types, //! each of the floating point types, the `bool` type, tuples, characters, //! strings (`str`), vectors (`vec`), managed boxes (`managed`), owned -//! boxes (`owned`), and unsafe and borrowed pointers (`ptr`, `borrowed`). +//! boxes (`owned`), and unsafe pointers and references (`ptr`, `borrowed`). //! Additionally, `std` provides pervasive types (`option` and `result`), //! task creation and communication primitives (`task`, `comm`), platform //! abstractions (`os` and `path`), basic I/O abstractions (`io`), common diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 450cf1a4ef2..3cb7fcd9533 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -71,7 +71,7 @@ traits from other modules. Some notable examples: ## Iteration The method `iter()` returns an iteration value for a vector or a vector slice. -The iterator yields borrowed pointers to the vector's elements, so if the element +The iterator yields references to the vector's elements, so if the element type of the vector is `int`, the element type of the iterator is `&int`. ```rust -- cgit 1.4.1-3-g733a5