diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-01-07 18:49:13 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-01-07 18:49:13 -0800 |
| commit | d32363266968c0259c3ec2065c5dd7b6fc85b152 (patch) | |
| tree | 4415980f8b6384ca7532a5b4c259e4b8d2515e7e /src/libstd | |
| parent | b65b4d63841d09395db18eaed6e8007086592188 (diff) | |
| download | rust-d32363266968c0259c3ec2065c5dd7b6fc85b152.tar.gz rust-d32363266968c0259c3ec2065c5dd7b6fc85b152.zip | |
'borrowed pointer' -> 'reference'
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/borrow.rs | 2 | ||||
| -rw-r--r-- | src/libstd/cast.rs | 4 | ||||
| -rw-r--r-- | src/libstd/clone.rs | 2 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 2 | ||||
| -rw-r--r-- | src/libstd/vec.rs | 2 |
5 files changed, 6 insertions, 6 deletions
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<L, G>(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<T,P:RawPtr<T>>(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<T> 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 |
