]> git.lizzy.rs Git - rust.git/commitdiff
pluralize doc comment verbs and add missing periods
authorAndrew Paseltiner <apaseltiner@gmail.com>
Mon, 13 Apr 2015 14:21:32 +0000 (10:21 -0400)
committerAndrew Paseltiner <apaseltiner@gmail.com>
Mon, 13 Apr 2015 17:57:51 +0000 (13:57 -0400)
66 files changed:
src/libcollections/bit.rs
src/libcollections/btree/map.rs
src/libcollections/btree/set.rs
src/libcollections/slice.rs
src/libcollections/str.rs
src/libcollections/string.rs
src/libcollections/vec.rs
src/libcollections/vec_deque.rs
src/libcollections/vec_map.rs
src/libcore/any.rs
src/libcore/cell.rs
src/libcore/clone.rs
src/libcore/intrinsics.rs
src/libcore/iter.rs
src/libcore/mem.rs
src/libcore/nonzero.rs
src/libcore/num/mod.rs
src/libcore/option.rs
src/libcore/ptr.rs
src/libcore/result.rs
src/libcore/str/pattern.rs
src/libstd/ascii.rs
src/libstd/collections/hash/map.rs
src/libstd/collections/hash/set.rs
src/libstd/dynamic_lib.rs
src/libstd/env.rs
src/libstd/ffi/c_str.rs
src/libstd/ffi/mod.rs
src/libstd/ffi/os_str.rs
src/libstd/fs.rs
src/libstd/io/cursor.rs
src/libstd/io/error.rs
src/libstd/io/mod.rs
src/libstd/io/stdio.rs
src/libstd/net/ip.rs
src/libstd/net/tcp.rs
src/libstd/net/udp.rs
src/libstd/num/f32.rs
src/libstd/num/f64.rs
src/libstd/num/mod.rs
src/libstd/path.rs
src/libstd/process.rs
src/libstd/sync/barrier.rs
src/libstd/sync/condvar.rs
src/libstd/sync/mpsc/mod.rs
src/libstd/sync/mpsc/select.rs
src/libstd/sync/mutex.rs
src/libstd/sync/once.rs
src/libstd/sync/rwlock.rs
src/libstd/sys/common/condvar.rs
src/libstd/sys/common/mutex.rs
src/libstd/sys/common/poison.rs
src/libstd/sys/common/rwlock.rs
src/libstd/sys/common/thread_local.rs
src/libstd/sys/common/wtf8.rs
src/libstd/sys/unix/ext.rs
src/libstd/sys/unix/fd.rs
src/libstd/sys/unix/fs.rs
src/libstd/sys/unix/mod.rs
src/libstd/sys/unix/os.rs
src/libstd/sys/windows/ext.rs
src/libstd/sys/windows/mod.rs
src/libstd/sys/windows/os.rs
src/libstd/thread/local.rs
src/libstd/thread/mod.rs
src/libstd/thread/scoped_tls.rs

index d9255241af0e644415bb6fc04d25dc79f80d8756..d12b979e084fc33c8edb75a1c8e6d754c4d770a2 100644 (file)
@@ -923,7 +923,7 @@ pub fn push(&mut self, elem: bool) {
         self.set(insert_pos, elem);
     }
 
-    /// Return the total number of bits in this vector
+    /// Returns the total number of bits in this vector
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn len(&self) -> usize { self.nbits }
@@ -1695,7 +1695,7 @@ pub fn symmetric_difference_with(&mut self, other: &BitSet) {
         self.other_op(other, |w1, w2| w1 ^ w2);
     }
 
-    /// Return the number of set bits in this set.
+    /// Returns the number of set bits in this set.
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn len(&self) -> usize  {
index e704a956492962121206b8383c4f20f3ed58c3fa..413100039a2cc5ca50fc35110b74a4d970da5e03 100644 (file)
@@ -1339,7 +1339,7 @@ fn second<A, B>((_, b): (A, B)) -> B { b }
         Values { inner: self.iter().map(second) }
     }
 
-    /// Return the number of elements in the map.
+    /// Returns the number of elements in the map.
     ///
     /// # Examples
     ///
@@ -1354,7 +1354,7 @@ fn second<A, B>((_, b): (A, B)) -> B { b }
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn len(&self) -> usize { self.length }
 
-    /// Return true if the map contains no elements.
+    /// Returns true if the map contains no elements.
     ///
     /// # Examples
     ///
index 840110b5b276fffc7822d69d345db5e7ed9894d9..1abd56fd1458d25dab2562ff4d0ea9597831882d 100644 (file)
@@ -284,7 +284,7 @@ pub fn union<'a>(&'a self, other: &'a BTreeSet<T>) -> Union<'a, T> {
         Union{a: self.iter().peekable(), b: other.iter().peekable()}
     }
 
-    /// Return the number of elements in the set
+    /// Returns the number of elements in the set.
     ///
     /// # Examples
     ///
@@ -299,7 +299,7 @@ pub fn union<'a>(&'a self, other: &'a BTreeSet<T>) -> Union<'a, T> {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn len(&self) -> usize { self.map.len() }
 
-    /// Returns true if the set contains no elements
+    /// Returns true if the set contains no elements.
     ///
     /// # Examples
     ///
index 8622b8cd93568d8a42c3d909311002720852f9d0..5be9739cb32de7ccba1e6dbcf61e4b12f0683a62 100644 (file)
@@ -549,7 +549,7 @@ pub fn binary_search_by<F>(&self, f: F) -> Result<usize, usize> where F: FnMut(&
         core_slice::SliceExt::binary_search_by(self, f)
     }
 
-    /// Return the number of elements in the slice
+    /// Returns the number of elements in the slice.
     ///
     /// # Example
     ///
@@ -757,7 +757,7 @@ pub unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut T {
         core_slice::SliceExt::get_unchecked_mut(self, index)
     }
 
-    /// Return an unsafe mutable pointer to the slice's buffer.
+    /// Returns an unsafe mutable pointer to the slice's buffer.
     ///
     /// The caller must ensure that the slice outlives the pointer this
     /// function returns, or else it will end up pointing to garbage.
@@ -984,7 +984,7 @@ pub fn ends_with(&self, needle: &[T]) -> bool where T: PartialEq {
         core_slice::SliceExt::ends_with(self, needle)
     }
 
-    /// Convert `self` into a vector without clones or allocation.
+    /// Converts `self` into a vector without clones or allocation.
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
     pub fn into_vec(self: Box<Self>) -> Vec<T> {
index 98f2933effc2cf94667a5c87a9d372ba19625b0c..e1da8b3b3bccd375e3e3d250a60ac4498bdc8207 100644 (file)
@@ -1248,7 +1248,7 @@ pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str
         core_str::StrExt::trim_right_matches(&self[..], pat)
     }
 
-    /// Check that `index`-th byte lies at the start and/or end of a
+    /// Checks that `index`-th byte lies at the start and/or end of a
     /// UTF-8 code point sequence.
     ///
     /// The start and end of the string (when `index == self.len()`) are
@@ -1435,7 +1435,7 @@ pub fn char_at_reverse(&self, i: usize) -> char {
         core_str::StrExt::char_at_reverse(&self[..], i)
     }
 
-    /// Convert `self` to a byte slice.
+    /// Converts `self` to a byte slice.
     ///
     /// # Examples
     ///
@@ -1591,7 +1591,7 @@ pub fn subslice_offset(&self, inner: &str) -> usize {
         core_str::StrExt::subslice_offset(&self[..], inner)
     }
 
-    /// Return an unsafe pointer to the `&str`'s buffer.
+    /// Returns an unsafe pointer to the `&str`'s buffer.
     ///
     /// The caller must ensure that the string outlives this pointer, and
     /// that it is not
@@ -1609,7 +1609,7 @@ pub fn as_ptr(&self) -> *const u8 {
         core_str::StrExt::as_ptr(&self[..])
     }
 
-    /// Return an iterator of `u16` over the string encoded as UTF-16.
+    /// Returns an iterator of `u16` over the string encoded as UTF-16.
     #[unstable(feature = "collections",
                reason = "this functionality may only be provided by libunicode")]
     pub fn utf16_units(&self) -> Utf16Units {
index 441d0f2c5df79e01a776d69c46f20a6b04fda2ca..c3266ea2948c7e4fba6f1e8b52bbbd3f8aba78b1 100644 (file)
@@ -347,7 +347,7 @@ pub unsafe fn from_utf8_unchecked(bytes: Vec<u8>) -> String {
         String { vec: bytes }
     }
 
-    /// Return the underlying byte buffer, encoded as UTF-8.
+    /// Returns the underlying byte buffer, encoded as UTF-8.
     ///
     /// # Examples
     ///
@@ -363,7 +363,7 @@ pub fn into_bytes(self) -> Vec<u8> {
         self.vec
     }
 
-    /// Extract a string slice containing the entire string.
+    /// Extracts a string slice containing the entire string.
     #[inline]
     #[unstable(feature = "convert",
                reason = "waiting on RFC revision")]
@@ -607,7 +607,7 @@ pub fn remove(&mut self, idx: usize) -> char {
         ch
     }
 
-    /// Insert a character into the string buffer at byte position `idx`.
+    /// Inserts a character into the string buffer at byte position `idx`.
     ///
     /// # Warning
     ///
@@ -662,7 +662,7 @@ pub unsafe fn as_mut_vec(&mut self) -> &mut Vec<u8> {
         &mut self.vec
     }
 
-    /// Return the number of bytes in this string.
+    /// Returns the number of bytes in this string.
     ///
     /// # Examples
     ///
@@ -705,12 +705,12 @@ pub fn clear(&mut self) {
 }
 
 impl FromUtf8Error {
-    /// Consume this error, returning the bytes that were attempted to make a
+    /// Consumes this error, returning the bytes that were attempted to make a
     /// `String` with.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn into_bytes(self) -> Vec<u8> { self.bytes }
 
-    /// Access the underlying UTF8-error that was the cause of this error.
+    /// Accesss the underlying UTF8-error that was the cause of this error.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn utf8_error(&self) -> Utf8Error { self.error }
 }
@@ -959,7 +959,7 @@ fn deref<'b>(&'b self) -> &'b String {
     }
 }
 
-/// Convert a string slice to a wrapper type providing a `&String` reference.
+/// Converts a string slice to a wrapper type providing a `&String` reference.
 ///
 /// # Examples
 ///
index 240a55181de74e44b5fa94fcbc2c8514338cc8c8..4fa91a6a16a526ca9369b7ddfe4bc9b8b0209ddb 100644 (file)
@@ -393,7 +393,7 @@ pub fn shrink_to_fit(&mut self) {
         }
     }
 
-    /// Convert the vector into Box<[T]>.
+    /// Converts the vector into Box<[T]>.
     ///
     /// Note that this will drop any excess capacity. Calling this and
     /// converting back to a vector with `into_vec()` is equivalent to calling
@@ -434,7 +434,7 @@ pub fn truncate(&mut self, len: usize) {
         }
     }
 
-    /// Extract a slice containing the entire vector.
+    /// Extracts a slice containing the entire vector.
     #[inline]
     #[unstable(feature = "convert",
                reason = "waiting on RFC revision")]
@@ -1936,7 +1936,7 @@ fn drop(&mut self) {
     }
 }
 
-/// Convert a slice to a wrapper type providing a `&Vec<T>` reference.
+/// Converts a slice to a wrapper type providing a `&Vec<T>` reference.
 #[unstable(feature = "collections")]
 pub fn as_vec<'a, T>(x: &'a [T]) -> DerefVec<'a, T> {
     unsafe {
index 49b0c229215bd98ee8842debf19edb21b9d79275..a66cde81c8ba5943dd1adb609cd707b581d6c049 100644 (file)
@@ -481,7 +481,7 @@ pub fn shrink_to_fit(&mut self) {
         }
     }
 
-    /// Shorten a ringbuf, dropping excess elements from the back.
+    /// Shortens a ringbuf, dropping excess elements from the back.
     ///
     /// If `len` is greater than the ringbuf's current length, this has no
     /// effect.
index 3d9d8cf51ec6e2c82ff6e78023e33dbb73ee0c2a..cb86e4ab38d3d0b0bf37937c85cc6875b44585ea 100644 (file)
@@ -452,7 +452,7 @@ fn filter<A>((i, v): (usize, Option<A>)) -> Option<(usize, A)> {
         Drain { iter: self.v.drain().enumerate().filter_map(filter) }
     }
 
-    /// Return the number of elements in the map.
+    /// Returns the number of elements in the map.
     ///
     /// # Examples
     ///
@@ -470,7 +470,7 @@ pub fn len(&self) -> usize {
         self.v.iter().filter(|elt| elt.is_some()).count()
     }
 
-    /// Return true if the map contains no elements.
+    /// Returns true if the map contains no elements.
     ///
     /// # Examples
     ///
index 7025c76d92ce822c01fe4ae3498b0807d6e2fcf6..85b8accadf3e58665d4520591d773d98b6aceb1d 100644 (file)
@@ -91,7 +91,7 @@
 /// [mod]: index.html
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait Any: Reflect + 'static {
-    /// Get the `TypeId` of `self`
+    /// Gets the `TypeId` of `self`.
     #[unstable(feature = "core",
                reason = "this method will likely be replaced by an associated static")]
     fn get_type_id(&self) -> TypeId;
index 76e09eedbdfa574a86f447041d47fed9099613d8..df0de234b9a16ef9bc5ce6f2032d6c42bea77008 100644 (file)
@@ -211,7 +211,7 @@ pub fn set(&self, value: T) {
         }
     }
 
-    /// Get a reference to the underlying `UnsafeCell`.
+    /// Gets a reference to the underlying `UnsafeCell`.
     ///
     /// # Unsafety
     ///
@@ -436,7 +436,7 @@ pub fn borrow_mut<'a>(&'a self) -> RefMut<'a, T> {
         }
     }
 
-    /// Get a reference to the underlying `UnsafeCell`.
+    /// Gets a reference to the underlying `UnsafeCell`.
     ///
     /// This can be used to circumvent `RefCell`'s safety checks.
     ///
@@ -537,7 +537,7 @@ fn deref<'a>(&'a self) -> &'a T {
     }
 }
 
-/// Copy a `Ref`.
+/// Copies a `Ref`.
 ///
 /// The `RefCell` is already immutably borrowed, so this cannot fail.
 ///
@@ -647,7 +647,7 @@ pub struct UnsafeCell<T> {
 impl<T> !Sync for UnsafeCell<T> {}
 
 impl<T> UnsafeCell<T> {
-    /// Construct a new instance of `UnsafeCell` which will wrap the specified
+    /// Constructs a new instance of `UnsafeCell` which will wrap the specified
     /// value.
     ///
     /// All access to the inner value through methods is `unsafe`, and it is highly discouraged to
@@ -685,7 +685,7 @@ pub fn get(&self) -> *mut T {
         &self.value as *const T as *mut T
     }
 
-    /// Unwraps the value
+    /// Unwraps the value.
     ///
     /// # Unsafety
     ///
index 311901b43d400c63d58b1f09c8626c97f4ef7964..f11c01507dcd8aa22950cd7311c4e8abe552dc3f 100644 (file)
@@ -38,7 +38,7 @@ pub trait Clone : Sized {
     #[stable(feature = "rust1", since = "1.0.0")]
     fn clone(&self) -> Self;
 
-    /// Perform copy-assignment from `source`.
+    /// Performs copy-assignment from `source`.
     ///
     /// `a.clone_from(&b)` is equivalent to `a = b.clone()` in functionality,
     /// but can be overridden to reuse the resources of `a` to avoid unnecessary
@@ -52,7 +52,7 @@ fn clone_from(&mut self, source: &Self) {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, T: ?Sized> Clone for &'a T {
-    /// Return a shallow copy of the reference.
+    /// Returns a shallow copy of the reference.
     #[inline]
     fn clone(&self) -> &'a T { *self }
 }
@@ -61,7 +61,7 @@ macro_rules! clone_impl {
     ($t:ty) => {
         #[stable(feature = "rust1", since = "1.0.0")]
         impl Clone for $t {
-            /// Return a deep copy of the value.
+            /// Returns a deep copy of the value.
             #[inline]
             fn clone(&self) -> $t { *self }
         }
@@ -92,28 +92,28 @@ macro_rules! extern_fn_clone {
         #[unstable(feature = "core",
                    reason = "this may not be sufficient for fns with region parameters")]
         impl<$($A,)* ReturnType> Clone for extern "Rust" fn($($A),*) -> ReturnType {
-            /// Return a copy of a function pointer
+            /// Returns a copy of a function pointer.
             #[inline]
             fn clone(&self) -> extern "Rust" fn($($A),*) -> ReturnType { *self }
         }
 
         #[unstable(feature = "core", reason = "brand new")]
         impl<$($A,)* ReturnType> Clone for extern "C" fn($($A),*) -> ReturnType {
-            /// Return a copy of a function pointer
+            /// Returns a copy of a function pointer.
             #[inline]
             fn clone(&self) -> extern "C" fn($($A),*) -> ReturnType { *self }
         }
 
         #[unstable(feature = "core", reason = "brand new")]
         impl<$($A,)* ReturnType> Clone for unsafe extern "Rust" fn($($A),*) -> ReturnType {
-            /// Return a copy of a function pointer
+            /// Returns a copy of a function pointer.
             #[inline]
             fn clone(&self) -> unsafe extern "Rust" fn($($A),*) -> ReturnType { *self }
         }
 
         #[unstable(feature = "core", reason = "brand new")]
         impl<$($A,)* ReturnType> Clone for unsafe extern "C" fn($($A),*) -> ReturnType {
-            /// Return a copy of a function pointer
+            /// Returns a copy of a function pointer.
             #[inline]
             fn clone(&self) -> unsafe extern "C" fn($($A),*) -> ReturnType { *self }
         }
index 80f506ebc0643053bad8190a616e3d9550218dc6..8ed89adec5b69385d208b821dcd39cfb67530497 100644 (file)
     pub fn atomic_fence_rel();
     pub fn atomic_fence_acqrel();
 
-    /// Abort the execution of the process.
+    /// Aborts the execution of the process.
     pub fn abort() -> !;
 
-    /// Tell LLVM that this point in the code is not reachable,
+    /// Tells LLVM that this point in the code is not reachable,
     /// enabling further optimizations.
     ///
     /// NB: This is very different from the `unreachable!()` macro!
     pub fn unreachable() -> !;
 
-    /// Inform the optimizer that a condition is always true.
+    /// Informs the optimizer that a condition is always true.
     /// If the condition is false, the behavior is undefined.
     ///
     /// No code is generated for this intrinsic, but the optimizer will try
     /// own, or if it does not enable any significant optimizations.
     pub fn assume(b: bool);
 
-    /// Execute a breakpoint trap, for inspection by a debugger.
+    /// Executes a breakpoint trap, for inspection by a debugger.
     pub fn breakpoint();
 
     /// The size of a type in bytes.
     /// elements.
     pub fn size_of<T>() -> usize;
 
-    /// Move a value to an uninitialized memory location.
+    /// Moves a value to an uninitialized memory location.
     ///
     /// Drop glue is not run on the destination.
     pub fn move_val_init<T>(dst: &mut T, src: T);
     /// crate it is invoked in.
     pub fn type_id<T: ?Sized + 'static>() -> u64;
 
-    /// Create a value initialized to so that its drop flag,
+    /// Creates a value initialized to so that its drop flag,
     /// if any, says that it has been dropped.
     ///
     /// `init_dropped` is unsafe because it returns a datum with all
     /// intrinsic).
     pub fn init_dropped<T>() -> T;
 
-    /// Create a value initialized to zero.
+    /// Creates a value initialized to zero.
     ///
     /// `init` is unsafe because it returns a zeroed-out datum,
     /// which is unsafe unless T is `Copy`.  Also, even if T is
     /// state for the type in question.
     pub fn init<T>() -> T;
 
-    /// Create an uninitialized value.
+    /// Creates an uninitialized value.
     ///
     /// `uninit` is unsafe because there is no guarantee of what its
     /// contents are. In particular its drop-flag may be set to any
     /// initialize memory previous set to the result of `uninit`.
     pub fn uninit<T>() -> T;
 
-    /// Move a value out of scope without running drop glue.
+    /// Moves a value out of scope without running drop glue.
     ///
     /// `forget` is unsafe because the caller is responsible for
     /// ensuring the argument is deallocated already.
index 9f378748d20077929dd35fd24004cb8c6062c061..81a5a676e1a67fde81756584ed7b485a2ce73595 100644 (file)
@@ -91,7 +91,7 @@ pub trait Iterator {
     #[stable(feature = "rust1", since = "1.0.0")]
     type Item;
 
-    /// Advance the iterator and return the next value. Return `None` when the
+    /// Advances the iterator and returns the next value. Returns `None` when the
     /// end is reached.
     #[stable(feature = "rust1", since = "1.0.0")]
     fn next(&mut self) -> Option<Self::Item>;
@@ -670,7 +670,7 @@ fn find<P>(&mut self, mut predicate: P) -> Option<Self::Item> where
         None
     }
 
-    /// Return the index of the first element satisfying the specified predicate
+    /// Returns the index of the first element satisfying the specified predicate
     ///
     /// Does not consume the iterator past the first found element.
     ///
@@ -698,7 +698,7 @@ fn position<P>(&mut self, mut predicate: P) -> Option<usize> where
         None
     }
 
-    /// Return the index of the last element satisfying the specified predicate
+    /// Returns the index of the last element satisfying the specified predicate
     ///
     /// If no element matches, None is returned.
     ///
@@ -853,7 +853,7 @@ fn min_max(mut self) -> MinMaxResult<Self::Item> where Self: Sized, Self::Item:
         MinMax(min, max)
     }
 
-    /// Return the element that gives the maximum value from the
+    /// Returns the element that gives the maximum value from the
     /// specified function.
     ///
     /// Returns the rightmost element if the comparison determines two elements
@@ -882,7 +882,7 @@ fn max_by<B: Ord, F>(self, f: F) -> Option<Self::Item> where
             .map(|(_, x)| x)
     }
 
-    /// Return the element that gives the minimum value from the
+    /// Returns the element that gives the minimum value from the
     /// specified function.
     ///
     /// Returns the leftmost element if the comparison determines two elements
@@ -1099,7 +1099,7 @@ fn size_hint(&self) -> (usize, Option<usize>) { (**self).size_hint() }
 #[rustc_on_unimplemented="a collection of type `{Self}` cannot be \
                           built from an iterator over elements of type `{A}`"]
 pub trait FromIterator<A> {
-    /// Build a container with elements from something iterable.
+    /// Builds a container with elements from something iterable.
     ///
     /// # Examples
     ///
@@ -1158,7 +1158,7 @@ fn into_iter(self) -> I {
 /// A type growable from an `Iterator` implementation
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait Extend<A> {
-    /// Extend a container with the elements yielded by an arbitrary iterator
+    /// Extends a container with the elements yielded by an arbitrary iterator
     #[stable(feature = "rust1", since = "1.0.0")]
     fn extend<T: IntoIterator<Item=A>>(&mut self, iterable: T);
 }
@@ -1170,7 +1170,7 @@ pub trait Extend<A> {
 /// independently of each other.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait DoubleEndedIterator: Iterator {
-    /// Yield an element from the end of the range, returning `None` if the
+    /// Yields an element from the end of the range, returning `None` if the
     /// range is empty.
     #[stable(feature = "rust1", since = "1.0.0")]
     fn next_back(&mut self) -> Option<Self::Item>;
@@ -1191,11 +1191,11 @@ fn next_back(&mut self) -> Option<I::Item> { (**self).next_back() }
            reason = "not widely used, may be better decomposed into Index \
                      and ExactSizeIterator")]
 pub trait RandomAccessIterator: Iterator {
-    /// Return the number of indexable elements. At most `std::usize::MAX`
+    /// Returns the number of indexable elements. At most `std::usize::MAX`
     /// elements are indexable, even if the iterator represents a longer range.
     fn indexable(&self) -> usize;
 
-    /// Return an element at an index, or `None` if the index is out of bounds
+    /// Returns an element at an index, or `None` if the index is out of bounds
     fn idx(&mut self, index: usize) -> Option<Self::Item>;
 }
 
@@ -1210,7 +1210,7 @@ pub trait RandomAccessIterator: Iterator {
 pub trait ExactSizeIterator: Iterator {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    /// Return the exact length of the iterator.
+    /// Returns the exact length of the iterator.
     fn len(&self) -> usize {
         let (lower, upper) = self.size_hint();
         // Note: This assertion is overly defensive, but it checks the invariant
@@ -1856,7 +1856,7 @@ impl<I: ExactSizeIterator> ExactSizeIterator for Peekable<I> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<I: Iterator> Peekable<I> {
-    /// Return a reference to the next element of the iterator with out
+    /// Returns a reference to the next element of the iterator with out
     /// advancing it, or None if the iterator is exhausted.
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -1870,7 +1870,7 @@ pub fn peek(&mut self) -> Option<&I::Item> {
         }
     }
 
-    /// Check whether peekable iterator is empty or not.
+    /// Checks whether peekable iterator is empty or not.
     #[inline]
     pub fn is_empty(&mut self) -> bool {
         self.peek().is_none()
@@ -2401,12 +2401,12 @@ pub trait Step: PartialOrd {
     /// Steps `self` if possible.
     fn step(&self, by: &Self) -> Option<Self>;
 
-    /// The number of steps between two step objects.
+    /// Returns the number of steps between two step objects.
     ///
     /// `start` should always be less than `end`, so the result should never
     /// be negative.
     ///
-    /// Return `None` if it is not possible to calculate steps_between
+    /// Returns `None` if it is not possible to calculate steps_between
     /// without overflow.
     fn steps_between(start: &Self, end: &Self, by: &Self) -> Option<usize>;
 }
@@ -2549,7 +2549,7 @@ pub struct RangeInclusive<A> {
     done: bool,
 }
 
-/// Return an iterator over the range [start, stop]
+/// Returns an iterator over the range [start, stop].
 #[inline]
 #[unstable(feature = "core",
            reason = "likely to be replaced by range notation and adapters")]
@@ -2657,7 +2657,7 @@ pub struct RangeStepInclusive<A> {
     done: bool,
 }
 
-/// Return an iterator over the range [start, stop] by `step`.
+/// Returns an iterator over the range [start, stop] by `step`.
 ///
 /// It handles overflow by stopping.
 ///
@@ -2827,7 +2827,7 @@ fn idx(&mut self, _: usize) -> Option<A> { Some(self.element.clone()) }
 #[unstable(feature = "core")]
 pub type Iterate<T, F> = Unfold<IterateState<T, F>, fn(&mut IterateState<T, F>) -> Option<T>>;
 
-/// Create a new iterator that produces an infinite sequence of
+/// Creates a new iterator that produces an infinite sequence of
 /// repeated applications of the given function `f`.
 #[unstable(feature = "core")]
 pub fn iterate<T, F>(seed: T, f: F) -> Iterate<T, F> where
@@ -2853,7 +2853,7 @@ fn next<T, F>(st: &mut IterateState<T, F>) -> Option<T> where
     Unfold::new((f, Some(seed), true), next)
 }
 
-/// Create a new iterator that endlessly repeats the element `elt`.
+/// Creates a new iterator that endlessly repeats the element `elt`.
 #[inline]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub fn repeat<T: Clone>(elt: T) -> Repeat<T> {
@@ -2940,7 +2940,7 @@ pub fn eq<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
         }
     }
 
-    /// Compare `a` and `b` for nonequality (Using partial equality, `PartialEq`)
+    /// Compares `a` and `b` for nonequality (Using partial equality, `PartialEq`)
     pub fn ne<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
         L::Item: PartialEq<R::Item>,
     {
@@ -2953,7 +2953,7 @@ pub fn ne<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
         }
     }
 
-    /// Return `a` < `b` lexicographically (Using partial order, `PartialOrd`)
+    /// Returns `a` < `b` lexicographically (Using partial order, `PartialOrd`)
     pub fn lt<R: Iterator, L: Iterator>(mut a: L, mut b: R) -> bool where
         L::Item: PartialOrd<R::Item>,
     {
@@ -2967,7 +2967,7 @@ pub fn lt<R: Iterator, L: Iterator>(mut a: L, mut b: R) -> bool where
         }
     }
 
-    /// Return `a` <= `b` lexicographically (Using partial order, `PartialOrd`)
+    /// Returns `a` <= `b` lexicographically (Using partial order, `PartialOrd`)
     pub fn le<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
         L::Item: PartialOrd<R::Item>,
     {
@@ -2981,7 +2981,7 @@ pub fn le<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
         }
     }
 
-    /// Return `a` > `b` lexicographically (Using partial order, `PartialOrd`)
+    /// Returns `a` > `b` lexicographically (Using partial order, `PartialOrd`)
     pub fn gt<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
         L::Item: PartialOrd<R::Item>,
     {
@@ -2995,7 +2995,7 @@ pub fn gt<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
         }
     }
 
-    /// Return `a` >= `b` lexicographically (Using partial order, `PartialOrd`)
+    /// Returns `a` >= `b` lexicographically (Using partial order, `PartialOrd`)
     pub fn ge<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
         L::Item: PartialOrd<R::Item>,
     {
index 249beb6295c0733be70e4f74806ee1fbe3c2ea90..c4128e79765c8157a8f738b2eb090b7a0d463c1f 100644 (file)
@@ -134,7 +134,7 @@ pub fn align_of_val<T>(_val: &T) -> usize {
     align_of::<T>()
 }
 
-/// Create a value initialized to zero.
+/// Creates a value initialized to zero.
 ///
 /// This function is similar to allocating space for a local variable and zeroing it out (an unsafe
 /// operation).
@@ -158,7 +158,7 @@ pub unsafe fn zeroed<T>() -> T {
     intrinsics::init()
 }
 
-/// Create a value initialized to an unspecified series of bytes.
+/// Creates a value initialized to an unspecified series of bytes.
 ///
 /// The byte sequence usually indicates that the value at the memory
 /// in question has been dropped. Thus, *if* T carries a drop flag,
@@ -179,7 +179,7 @@ unsafe fn dropped_impl<T>() -> T { intrinsics::init_dropped() }
     dropped_impl()
 }
 
-/// Create an uninitialized value.
+/// Creates an uninitialized value.
 ///
 /// Care must be taken when using this function, if the type `T` has a destructor and the value
 /// falls out of scope (due to unwinding or returning) before being initialized, then the
@@ -234,7 +234,7 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
     }
 }
 
-/// Replace the value at a mutable location with a new one, returning the old value, without
+/// Replaces the value at a mutable location with a new one, returning the old value, without
 /// deinitialising or copying either one.
 ///
 /// This is primarily used for transferring and swapping ownership of a value in a mutable
index 3df4d00f60cc4c941e5007d872d6de64bc624c84..db2d1b2f1fdaa7a686221fe803595a32d4812871 100644 (file)
@@ -38,7 +38,7 @@ unsafe impl Zeroable for u64 {}
 pub struct NonZero<T: Zeroable>(T);
 
 impl<T: Zeroable> NonZero<T> {
-    /// Create an instance of NonZero with the provided value.
+    /// Creates an instance of NonZero with the provided value.
     /// You must indeed ensure that the value is actually "non-zero".
     #[inline(always)]
     pub unsafe fn new(inner: T) -> NonZero<T> {
index 3fd179cf86f3a5a2510f4b0dc423cbe368d6cfa3..9b1a384a0d06a90865556f930a15ffbe7fa721ec 100644 (file)
@@ -268,7 +268,7 @@ fn count_zeros(self) -> u32 {
     #[stable(feature = "rust1", since = "1.0.0")]
     fn swap_bytes(self) -> Self;
 
-    /// Convert an integer from big endian to the target's endianness.
+    /// Converts an integer from big endian to the target's endianness.
     ///
     /// On big endian this is a no-op. On little endian the bytes are swapped.
     ///
@@ -291,7 +291,7 @@ fn from_be(x: Self) -> Self {
         if cfg!(target_endian = "big") { x } else { x.swap_bytes() }
     }
 
-    /// Convert an integer from little endian to the target's endianness.
+    /// Converts an integer from little endian to the target's endianness.
     ///
     /// On little endian this is a no-op. On big endian the bytes are swapped.
     ///
@@ -314,7 +314,7 @@ fn from_le(x: Self) -> Self {
         if cfg!(target_endian = "little") { x } else { x.swap_bytes() }
     }
 
-    /// Convert `self` to big endian from the target's endianness.
+    /// Converts `self` to big endian from the target's endianness.
     ///
     /// On big endian this is a no-op. On little endian the bytes are swapped.
     ///
@@ -337,7 +337,7 @@ fn to_be(self) -> Self { // or not to be?
         if cfg!(target_endian = "big") { self } else { self.swap_bytes() }
     }
 
-    /// Convert `self` to little endian from the target's endianness.
+    /// Converts `self` to little endian from the target's endianness.
     ///
     /// On little endian this is a no-op. On big endian the bytes are swapped.
     ///
@@ -845,7 +845,7 @@ pub fn max_value() -> $T {
             let min: $T = Int::min_value(); !min
         }
 
-        /// Convert a string slice in a given base to an integer.
+        /// Converts a string slice in a given base to an integer.
         ///
         /// Leading and trailing whitespace represent an error.
         ///
@@ -995,7 +995,7 @@ pub fn swap_bytes(self) -> $T {
             (self as $UnsignedT).swap_bytes() as $T
         }
 
-        /// Convert an integer from big endian to the target's endianness.
+        /// Converts an integer from big endian to the target's endianness.
         ///
         /// On big endian this is a no-op. On little endian the bytes are
         /// swapped.
@@ -1019,7 +1019,7 @@ pub fn from_be(x: $T) -> $T {
             if cfg!(target_endian = "big") { x } else { x.swap_bytes() }
         }
 
-        /// Convert an integer from little endian to the target's endianness.
+        /// Converts an integer from little endian to the target's endianness.
         ///
         /// On little endian this is a no-op. On big endian the bytes are
         /// swapped.
@@ -1043,7 +1043,7 @@ pub fn from_le(x: $T) -> $T {
             if cfg!(target_endian = "little") { x } else { x.swap_bytes() }
         }
 
-        /// Convert `self` to big endian from the target's endianness.
+        /// Converts `self` to big endian from the target's endianness.
         ///
         /// On big endian this is a no-op. On little endian the bytes are
         /// swapped.
@@ -1067,7 +1067,7 @@ pub fn to_be(self) -> $T { // or not to be?
             if cfg!(target_endian = "big") { self } else { self.swap_bytes() }
         }
 
-        /// Convert `self` to little endian from the target's endianness.
+        /// Converts `self` to little endian from the target's endianness.
         ///
         /// On little endian this is a no-op. On big endian the bytes are
         /// swapped.
@@ -1361,7 +1361,7 @@ pub fn min_value() -> $T { 0 }
         #[stable(feature = "rust1", since = "1.0.0")]
         pub fn max_value() -> $T { !0 }
 
-        /// Convert a string slice in a given base to an integer.
+        /// Converts a string slice in a given base to an integer.
         ///
         /// Leading and trailing whitespace represent an error.
         ///
@@ -1517,7 +1517,7 @@ pub fn swap_bytes(self) -> $T {
             unsafe { $bswap(self as $ActualT) as $T }
         }
 
-        /// Convert an integer from big endian to the target's endianness.
+        /// Converts an integer from big endian to the target's endianness.
         ///
         /// On big endian this is a no-op. On little endian the bytes are
         /// swapped.
@@ -1541,7 +1541,7 @@ pub fn from_be(x: $T) -> $T {
             if cfg!(target_endian = "big") { x } else { x.swap_bytes() }
         }
 
-        /// Convert an integer from little endian to the target's endianness.
+        /// Converts an integer from little endian to the target's endianness.
         ///
         /// On little endian this is a no-op. On big endian the bytes are
         /// swapped.
@@ -1565,7 +1565,7 @@ pub fn from_le(x: $T) -> $T {
             if cfg!(target_endian = "little") { x } else { x.swap_bytes() }
         }
 
-        /// Convert `self` to big endian from the target's endianness.
+        /// Converts `self` to big endian from the target's endianness.
         ///
         /// On big endian this is a no-op. On little endian the bytes are
         /// swapped.
@@ -1589,7 +1589,7 @@ pub fn to_be(self) -> $T { // or not to be?
             if cfg!(target_endian = "big") { self } else { self.swap_bytes() }
         }
 
-        /// Convert `self` to little endian from the target's endianness.
+        /// Converts `self` to little endian from the target's endianness.
         ///
         /// On little endian this is a no-op. On big endian the bytes are
         /// swapped.
@@ -2183,7 +2183,7 @@ fn to_f64(&self) -> Option<f64> { impl_to_primitive_float_to_float!($T, f64, *se
 /// A generic trait for converting a number to a value.
 #[unstable(feature = "core", reason = "trait is likely to be removed")]
 pub trait FromPrimitive : ::marker::Sized {
-    /// Convert an `isize` to return an optional value of this type. If the
+    /// Converts an `isize` to return an optional value of this type. If the
     /// value cannot be represented by this value, the `None` is returned.
     #[inline]
     #[unstable(feature = "core")]
@@ -2192,39 +2192,39 @@ fn from_int(n: isize) -> Option<Self> {
         FromPrimitive::from_i64(n as i64)
     }
 
-    /// Convert an `isize` to return an optional value of this type. If the
+    /// Converts an `isize` to return an optional value of this type. If the
     /// value cannot be represented by this value, the `None` is returned.
     #[inline]
     fn from_isize(n: isize) -> Option<Self> {
         FromPrimitive::from_i64(n as i64)
     }
 
-    /// Convert an `i8` to return an optional value of this type. If the
+    /// Converts an `i8` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     #[inline]
     fn from_i8(n: i8) -> Option<Self> {
         FromPrimitive::from_i64(n as i64)
     }
 
-    /// Convert an `i16` to return an optional value of this type. If the
+    /// Converts an `i16` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     #[inline]
     fn from_i16(n: i16) -> Option<Self> {
         FromPrimitive::from_i64(n as i64)
     }
 
-    /// Convert an `i32` to return an optional value of this type. If the
+    /// Converts an `i32` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     #[inline]
     fn from_i32(n: i32) -> Option<Self> {
         FromPrimitive::from_i64(n as i64)
     }
 
-    /// Convert an `i64` to return an optional value of this type. If the
+    /// Converts an `i64` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     fn from_i64(n: i64) -> Option<Self>;
 
-    /// Convert an `usize` to return an optional value of this type. If the
+    /// Converts an `usize` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     #[inline]
     #[unstable(feature = "core")]
@@ -2233,46 +2233,46 @@ fn from_uint(n: usize) -> Option<Self> {
         FromPrimitive::from_u64(n as u64)
     }
 
-    /// Convert a `usize` to return an optional value of this type. If the
+    /// Converts a `usize` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     #[inline]
     fn from_usize(n: usize) -> Option<Self> {
         FromPrimitive::from_u64(n as u64)
     }
 
-    /// Convert an `u8` to return an optional value of this type. If the
+    /// Converts an `u8` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     #[inline]
     fn from_u8(n: u8) -> Option<Self> {
         FromPrimitive::from_u64(n as u64)
     }
 
-    /// Convert an `u16` to return an optional value of this type. If the
+    /// Converts an `u16` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     #[inline]
     fn from_u16(n: u16) -> Option<Self> {
         FromPrimitive::from_u64(n as u64)
     }
 
-    /// Convert an `u32` to return an optional value of this type. If the
+    /// Converts an `u32` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     #[inline]
     fn from_u32(n: u32) -> Option<Self> {
         FromPrimitive::from_u64(n as u64)
     }
 
-    /// Convert an `u64` to return an optional value of this type. If the
+    /// Converts an `u64` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     fn from_u64(n: u64) -> Option<Self>;
 
-    /// Convert a `f32` to return an optional value of this type. If the
+    /// Converts a `f32` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     #[inline]
     fn from_f32(n: f32) -> Option<Self> {
         FromPrimitive::from_f64(n as f64)
     }
 
-    /// Convert a `f64` to return an optional value of this type. If the
+    /// Converts a `f64` to return an optional value of this type. If the
     /// type cannot be represented by this value, the `None` is returned.
     #[inline]
     fn from_f64(n: f64) -> Option<Self> {
@@ -2401,7 +2401,7 @@ impl FromPrimitive for $T {
 impl_from_primitive! { f32, to_f32 }
 impl_from_primitive! { f64, to_f64 }
 
-/// Cast from one machine scalar to another.
+/// Casts from one machine scalar to another.
 ///
 /// # Examples
 ///
@@ -2583,16 +2583,16 @@ pub trait Float
     /// Returns the mantissa, exponent and sign as integers, respectively.
     fn integer_decode(self) -> (u64, i16, i8);
 
-    /// Return the largest integer less than or equal to a number.
+    /// Returns the largest integer less than or equal to a number.
     fn floor(self) -> Self;
-    /// Return the smallest integer greater than or equal to a number.
+    /// Returns the smallest integer greater than or equal to a number.
     fn ceil(self) -> Self;
-    /// Return the nearest integer to a number. Round half-way cases away from
+    /// Returns the nearest integer to a number. Round half-way cases away from
     /// `0.0`.
     fn round(self) -> Self;
-    /// Return the integer part of a number.
+    /// Returns the integer part of a number.
     fn trunc(self) -> Self;
-    /// Return the fractional part of a number.
+    /// Returns the fractional part of a number.
     fn fract(self) -> Self;
 
     /// Computes the absolute value of `self`. Returns `Float::nan()` if the
@@ -2615,21 +2615,21 @@ pub trait Float
     /// error. This produces a more accurate result with better performance than
     /// a separate multiplication operation followed by an add.
     fn mul_add(self, a: Self, b: Self) -> Self;
-    /// Take the reciprocal (inverse) of a number, `1/x`.
+    /// Takes the reciprocal (inverse) of a number, `1/x`.
     fn recip(self) -> Self;
 
-    /// Raise a number to an integer power.
+    /// Raises a number to an integer power.
     ///
     /// Using this function is generally faster than using `powf`
     fn powi(self, n: i32) -> Self;
-    /// Raise a number to a floating point power.
+    /// Raises a number to a floating point power.
     fn powf(self, n: Self) -> Self;
 
-    /// Take the square root of a number.
+    /// Takes the square root of a number.
     ///
     /// Returns NaN if `self` is a negative number.
     fn sqrt(self) -> Self;
-    /// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
+    /// Takes the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
     fn rsqrt(self) -> Self;
 
     /// Returns `e^(self)`, (the exponential function).
@@ -2645,9 +2645,9 @@ pub trait Float
     /// Returns the base 10 logarithm of the number.
     fn log10(self) -> Self;
 
-    /// Convert radians to degrees.
+    /// Converts radians to degrees.
     fn to_degrees(self) -> Self;
-    /// Convert degrees to radians.
+    /// Converts degrees to radians.
     fn to_radians(self) -> Self;
 }
 
@@ -2682,7 +2682,7 @@ macro_rules! from_str_radix_float_impl {
         impl FromStr for $T {
             type Err = ParseFloatError;
 
-            /// Convert a string in base 10 to a float.
+            /// Converts a string in base 10 to a float.
             /// Accepts an optional decimal exponent.
             ///
             /// This function accepts strings such as
@@ -2719,7 +2719,7 @@ fn from_str(src: &str) -> Result<$T, ParseFloatError> {
         impl FromStrRadix for $T {
             type Err = ParseFloatError;
 
-            /// Convert a string in a given base to a float.
+            /// Converts a string in a given base to a float.
             ///
             /// Due to possible conflicts, this function does **not** accept
             /// the special values `inf`, `-inf`, `+inf` and `NaN`, **nor**
index 6db7c9bd99d9b08cb02fa3e12ca5d79e84bd695a..4c784a579da6b004f83b8f6616b56046f0546181 100644 (file)
@@ -223,7 +223,7 @@ pub fn is_none(&self) -> bool {
     // Adapter for working with references
     /////////////////////////////////////////////////////////////////////////
 
-    /// Convert from `Option<T>` to `Option<&T>`
+    /// Converts from `Option<T>` to `Option<&T>`
     ///
     /// # Examples
     ///
@@ -248,7 +248,7 @@ pub fn as_ref<'r>(&'r self) -> Option<&'r T> {
         }
     }
 
-    /// Convert from `Option<T>` to `Option<&mut T>`
+    /// Converts from `Option<T>` to `Option<&mut T>`
     ///
     /// # Examples
     ///
@@ -269,7 +269,7 @@ pub fn as_mut<'r>(&'r mut self) -> Option<&'r mut T> {
         }
     }
 
-    /// Convert from `Option<T>` to `&mut [T]` (without copying)
+    /// Converts from `Option<T>` to `&mut [T]` (without copying)
     ///
     /// # Examples
     ///
@@ -704,7 +704,7 @@ pub fn take(&mut self) -> Option<T> {
         mem::replace(self, None)
     }
 
-    /// Convert from `Option<T>` to `&[T]` (without copying)
+    /// Converts from `Option<T>` to `&[T]` (without copying)
     #[inline]
     #[unstable(feature = "as_slice", since = "unsure of the utility here")]
     pub fn as_slice<'a>(&'a self) -> &'a [T] {
index a622ef78a21a4d6235a9ee5ec25774b2e50d9528..9a165a2e3173bca16654a16f977cc5b7b4796da8 100644 (file)
@@ -544,19 +544,19 @@ unsafe impl<T: Send + ?Sized> Send for Unique<T> { }
 unsafe impl<T: Sync + ?Sized> Sync for Unique<T> { }
 
 impl<T: ?Sized> Unique<T> {
-    /// Create a new `Unique`.
+    /// Creates a new `Unique`.
     #[unstable(feature = "unique")]
     pub unsafe fn new(ptr: *mut T) -> Unique<T> {
         Unique { pointer: NonZero::new(ptr), _marker: PhantomData }
     }
 
-    /// Dereference the content.
+    /// Dereferences the content.
     #[unstable(feature = "unique")]
     pub unsafe fn get(&self) -> &T {
         &**self.pointer
     }
 
-    /// Mutably dereference the content.
+    /// Mutably dereferences the content.
     #[unstable(feature = "unique")]
     pub unsafe fn get_mut(&mut self) -> &mut T {
         &mut ***self
index 67a5ab891f72ca2b2ba840929bd3fe5806f2be04..dcec75fc170dab682936b3b89f9ec5d3655240ac 100644 (file)
@@ -311,7 +311,7 @@ pub fn is_err(&self) -> bool {
     // Adapter for each variant
     /////////////////////////////////////////////////////////////////////////
 
-    /// Convert from `Result<T, E>` to `Option<T>`
+    /// Converts from `Result<T, E>` to `Option<T>`
     ///
     /// Converts `self` into an `Option<T>`, consuming `self`,
     /// and discarding the error, if any.
@@ -334,7 +334,7 @@ pub fn ok(self) -> Option<T> {
         }
     }
 
-    /// Convert from `Result<T, E>` to `Option<E>`
+    /// Converts from `Result<T, E>` to `Option<E>`
     ///
     /// Converts `self` into an `Option<E>`, consuming `self`,
     /// and discarding the success value, if any.
@@ -361,7 +361,7 @@ pub fn err(self) -> Option<E> {
     // Adapter for working with references
     /////////////////////////////////////////////////////////////////////////
 
-    /// Convert from `Result<T, E>` to `Result<&T, &E>`
+    /// Converts from `Result<T, E>` to `Result<&T, &E>`
     ///
     /// Produces a new `Result`, containing a reference
     /// into the original, leaving the original in place.
@@ -382,7 +382,7 @@ pub fn as_ref(&self) -> Result<&T, &E> {
         }
     }
 
-    /// Convert from `Result<T, E>` to `Result<&mut T, &mut E>`
+    /// Converts from `Result<T, E>` to `Result<&mut T, &mut E>`
     ///
     /// ```
     /// fn mutate(r: &mut Result<i32, i32>) {
@@ -409,7 +409,7 @@ pub fn as_mut(&mut self) -> Result<&mut T, &mut E> {
         }
     }
 
-    /// Convert from `Result<T, E>` to `&[T]` (without copying)
+    /// Converts from `Result<T, E>` to `&[T]` (without copying)
     #[inline]
     #[unstable(feature = "as_slice", since = "unsure of the utility here")]
     pub fn as_slice(&self) -> &[T] {
@@ -423,7 +423,7 @@ pub fn as_slice(&self) -> &[T] {
         }
     }
 
-    /// Convert from `Result<T, E>` to `&mut [T]` (without copying)
+    /// Converts from `Result<T, E>` to `&mut [T]` (without copying)
     ///
     /// ```
     /// # #![feature(core)]
@@ -811,7 +811,7 @@ pub fn unwrap_err(self) -> E {
              reason = "use inherent method instead")]
 #[allow(deprecated)]
 impl<T, E> AsSlice<T> for Result<T, E> {
-    /// Convert from `Result<T, E>` to `&[T]` (without copying)
+    /// Converts from `Result<T, E>` to `&[T]` (without copying)
     #[inline]
     fn as_slice<'a>(&'a self) -> &'a [T] {
         match *self {
@@ -974,7 +974,7 @@ fn next(&mut self) -> Option<T> {
 // FromIterator
 /////////////////////////////////////////////////////////////////////////////
 
-/// Perform a fold operation over the result values from an iterator.
+/// Performs a fold operation over the result values from an iterator.
 ///
 /// If an `Err` is encountered, it is immediately returned.
 /// Otherwise, the folded value is returned.
index 9f701e1b031816692c216397f2afd8d54743548e..62b693dcbe6ae06f093993622188ec7202a76ab3 100644 (file)
@@ -32,17 +32,17 @@ pub trait Pattern<'a>: Sized {
     /// Associated searcher for this pattern
     type Searcher: Searcher<'a>;
 
-    /// Construct the associated searcher from
+    /// Constructs the associated searcher from
     /// `self` and the `haystack` to search in.
     fn into_searcher(self, haystack: &'a str) -> Self::Searcher;
 
-    /// Check whether the pattern matches anywhere in the haystack
+    /// Checks whether the pattern matches anywhere in the haystack
     #[inline]
     fn is_contained_in(self, haystack: &'a str) -> bool {
         self.into_searcher(haystack).next_match().is_some()
     }
 
-    /// Check whether the pattern matches at the front of the haystack
+    /// Checks whether the pattern matches at the front of the haystack
     #[inline]
     fn is_prefix_of(self, haystack: &'a str) -> bool {
         match self.into_searcher(haystack).next() {
@@ -51,7 +51,7 @@ fn is_prefix_of(self, haystack: &'a str) -> bool {
         }
     }
 
-    /// Check whether the pattern matches at the back of the haystack
+    /// Checks whether the pattern matches at the back of the haystack
     #[inline]
     fn is_suffix_of(self, haystack: &'a str) -> bool
         where Self::Searcher: ReverseSearcher<'a>
index 20ad71a4bf8c854ef1144a9ba91356d131d12c60..a2ba8c4c1bae07dfb9d494e3eb3c60a54f366b84 100644 (file)
 #[unstable(feature = "std_misc",
            reason = "would prefer to do this in a more general way")]
 pub trait OwnedAsciiExt {
-    /// Convert the string to ASCII upper case:
+    /// Converts the string to ASCII upper case:
     /// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z',
     /// but non-ASCII letters are unchanged.
     fn into_ascii_uppercase(self) -> Self;
 
-    /// Convert the string to ASCII lower case:
+    /// Converts the string to ASCII lower case:
     /// ASCII letters 'A' to 'Z' are mapped to 'a' to 'z',
     /// but non-ASCII letters are unchanged.
     fn into_ascii_lowercase(self) -> Self;
@@ -41,7 +41,7 @@ pub trait AsciiExt {
     #[stable(feature = "rust1", since = "1.0.0")]
     type Owned;
 
-    /// Check if within the ASCII range.
+    /// Checks if within the ASCII range.
     ///
     /// # Examples
     ///
@@ -95,7 +95,7 @@ pub trait AsciiExt {
     #[stable(feature = "rust1", since = "1.0.0")]
     fn to_ascii_lowercase(&self) -> Self::Owned;
 
-    /// Check that two strings are an ASCII case-insensitive match.
+    /// Checks that two strings are an ASCII case-insensitive match.
     ///
     /// Same as `to_ascii_lowercase(a) == to_ascii_lowercase(b)`,
     /// but without allocating and copying temporary strings.
@@ -117,7 +117,7 @@ pub trait AsciiExt {
     #[stable(feature = "rust1", since = "1.0.0")]
     fn eq_ignore_ascii_case(&self, other: &Self) -> bool;
 
-    /// Convert this type to its ASCII upper case equivalent in-place.
+    /// Converts this type to its ASCII upper case equivalent in-place.
     ///
     /// See `to_ascii_uppercase` for more information.
     ///
@@ -136,7 +136,7 @@ pub trait AsciiExt {
     #[unstable(feature = "ascii")]
     fn make_ascii_uppercase(&mut self);
 
-    /// Convert this type to its ASCII lower case equivalent in-place.
+    /// Converts this type to its ASCII lower case equivalent in-place.
     ///
     /// See `to_ascii_lowercase` for more information.
     ///
index 54a3a0557686dca6e7f0b1d2e3983616a2e9c70d..e507146bcb36577c9639cd8026acdf4088aadb09 100644 (file)
@@ -506,7 +506,7 @@ fn insert_hashed_ordered(&mut self, hash: SafeHash, k: K, v: V) {
 }
 
 impl<K: Hash + Eq, V> HashMap<K, V, RandomState> {
-    /// Create an empty HashMap.
+    /// Creates an empty HashMap.
     ///
     /// # Examples
     ///
@@ -563,7 +563,7 @@ pub fn with_hash_state(hash_state: S) -> HashMap<K, V, S> {
         }
     }
 
-    /// Create an empty HashMap with space for at least `capacity`
+    /// Creates an empty HashMap with space for at least `capacity`
     /// elements, using `hasher` to hash the keys.
     ///
     /// Warning: `hasher` is normally randomly generated, and
@@ -1596,7 +1596,7 @@ pub struct RandomState {
 #[unstable(feature = "std_misc",
            reason = "hashing an hash maps may be altered")]
 impl RandomState {
-    /// Construct a new `RandomState` that is initialized with random keys.
+    /// Constructs a new `RandomState` that is initialized with random keys.
     #[inline]
     #[allow(deprecated)]
     pub fn new() -> RandomState {
index f897d565321dabe638452b90b644a1b1ece30e6b..6b0546b1ee72f737c4e0cfa002afcb54d71e0d9a 100644 (file)
@@ -111,7 +111,7 @@ pub struct HashSet<T, S = RandomState> {
 }
 
 impl<T: Hash + Eq> HashSet<T, RandomState> {
-    /// Create an empty HashSet.
+    /// Creates an empty HashSet.
     ///
     /// # Examples
     ///
@@ -125,7 +125,7 @@ pub fn new() -> HashSet<T, RandomState> {
         HashSet::with_capacity(INITIAL_CAPACITY)
     }
 
-    /// Create an empty HashSet with space for at least `n` elements in
+    /// Creates an empty HashSet with space for at least `n` elements in
     /// the hash table.
     ///
     /// # Examples
@@ -166,7 +166,7 @@ pub fn with_hash_state(hash_state: S) -> HashSet<T, S> {
         HashSet::with_capacity_and_hash_state(INITIAL_CAPACITY, hash_state)
     }
 
-    /// Create an empty HashSet with space for at least `capacity`
+    /// Creates an empty HashSet with space for at least `capacity`
     /// elements in the hash table, using `hasher` to hash the keys.
     ///
     /// Warning: `hasher` is normally randomly generated, and
@@ -402,7 +402,7 @@ pub fn union<'a>(&'a self, other: &'a HashSet<T, S>) -> Union<'a, T, S> {
         Union { iter: self.iter().chain(other.difference(self)) }
     }
 
-    /// Return the number of elements in the set
+    /// Returns the number of elements in the set.
     ///
     /// # Examples
     ///
@@ -417,7 +417,7 @@ pub fn union<'a>(&'a self, other: &'a HashSet<T, S>) -> Union<'a, T, S> {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn len(&self) -> usize { self.map.len() }
 
-    /// Returns true if the set contains no elements
+    /// Returns true if the set contains no elements.
     ///
     /// # Examples
     ///
index e76d5460eb0c4218317461061e587fca3de7ddf5..c69df6435c49889b8b1181963208ea3c186323e1 100644 (file)
@@ -105,7 +105,7 @@ pub fn search_path() -> Vec<PathBuf> {
         }
     }
 
-    /// Access the value at the symbol of the dynamic library
+    /// Accesses the value at the symbol of the dynamic library.
     pub unsafe fn symbol<T>(&self, symbol: &str) -> Result<*mut T, String> {
         // This function should have a lifetime constraint of 'a on
         // T but that feature is still unimplemented
index 931cf46a58f2266ee822e6b6eb60a656e460f6ca..bcc109a71cb0436970c93bec58574d734b1fc75b 100644 (file)
@@ -261,7 +261,7 @@ pub fn set_var<K: ?Sized, V: ?Sized>(k: &K, v: &V)
     os_imp::setenv(k.as_ref(), v.as_ref())
 }
 
-/// Remove an environment variable from the environment of the currently running process.
+/// Removes an environment variable from the environment of the currently running process.
 ///
 /// # Examples
 ///
index de91e5f32683939d5bee102c8739c14a0d6b5e25..1910530c63a42a738f232bffdbbe158413e71a4c 100644 (file)
@@ -133,7 +133,7 @@ pub struct CStr {
 pub struct NulError(usize, Vec<u8>);
 
 impl CString {
-    /// Create a new C-compatible string from a container of bytes.
+    /// Creates a new C-compatible string from a container of bytes.
     ///
     /// This method will consume the provided data and use the underlying bytes
     /// to construct a new string, ensuring that there is a trailing 0 byte.
@@ -169,7 +169,7 @@ pub fn new<T: Into<Vec<u8>>>(t: T) -> Result<CString, NulError> {
         }
     }
 
-    /// Create a C-compatible string from a byte vector without checking for
+    /// Creates a C-compatible string from a byte vector without checking for
     /// interior 0 bytes.
     ///
     /// This method is equivalent to `from_vec` except that no runtime assertion
@@ -258,7 +258,7 @@ fn from(_: NulError) -> old_io::IoError {
 }
 
 impl CStr {
-    /// Cast a raw C string to a safe C string wrapper.
+    /// Casts a raw C string to a safe C string wrapper.
     ///
     /// This function will cast the provided `ptr` to the `CStr` wrapper which
     /// allows inspection and interoperation of non-owned C strings. This method
@@ -301,7 +301,7 @@ pub unsafe fn from_ptr<'a>(ptr: *const libc::c_char) -> &'a CStr {
         mem::transmute(slice::from_raw_parts(ptr, len as usize + 1))
     }
 
-    /// Return the inner pointer to this C string.
+    /// Returns the inner pointer to this C string.
     ///
     /// The returned pointer will be valid for as long as `self` is and points
     /// to a contiguous region of memory terminated with a 0 byte to represent
@@ -311,7 +311,7 @@ pub fn as_ptr(&self) -> *const libc::c_char {
         self.inner.as_ptr()
     }
 
-    /// Convert this C string to a byte slice.
+    /// Converts this C string to a byte slice.
     ///
     /// This function will calculate the length of this string (which normally
     /// requires a linear amount of work to be done) and then return the
@@ -329,7 +329,7 @@ pub fn to_bytes(&self) -> &[u8] {
         &bytes[..bytes.len() - 1]
     }
 
-    /// Convert this C string to a byte slice containing the trailing 0 byte.
+    /// Converts this C string to a byte slice containing the trailing 0 byte.
     ///
     /// This function is the equivalent of `to_bytes` except that it will retain
     /// the trailing nul instead of chopping it off.
index 1b7e913d46cbf49120c0f2798a5135477dec53ff..99becb67a5a7a1e6a78eef3cdaaa2aaa1c6a42af 100644 (file)
@@ -25,6 +25,6 @@
 /// Freely convertible to an `&OsStr` slice.
 #[unstable(feature = "std_misc")]
 pub trait AsOsStr {
-    /// Convert to an `&OsStr` slice.
+    /// Converts to an `&OsStr` slice.
     fn as_os_str(&self) -> &OsStr;
 }
index ab20efe25eb19da63db8ffd9e5f2020c41d674ce..5e61b29f34ced44d3dc99720c738039a7ad2e330 100644 (file)
@@ -69,7 +69,7 @@ pub fn new() -> OsString {
         OsString { inner: Buf::from_string(String::new()) }
     }
 
-    /// Construct an `OsString` from a byte sequence.
+    /// Constructs an `OsString` from a byte sequence.
     ///
     /// # Platform behavior
     ///
@@ -94,13 +94,13 @@ fn from_bytes_inner(vec: Vec<u8>) -> Option<OsString> {
         from_bytes_inner(bytes.into())
     }
 
-    /// Convert to an `OsStr` slice.
+    /// Converts to an `OsStr` slice.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn as_os_str(&self) -> &OsStr {
         self
     }
 
-    /// Convert the `OsString` into a `String` if it contains valid Unicode data.
+    /// Converts the `OsString` into a `String` if it contains valid Unicode data.
     ///
     /// On failure, ownership of the original `OsString` is returned.
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -108,7 +108,7 @@ pub fn into_string(self) -> Result<String, OsString> {
         self.inner.into_string().map_err(|buf| OsString { inner: buf} )
     }
 
-    /// Extend the string with the given `&OsStr` slice.
+    /// Extends the string with the given `&OsStr` slice.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn push<T: AsRef<OsStr>>(&mut self, s: T) {
         self.inner.push_slice(&s.as_ref().inner)
@@ -221,13 +221,13 @@ fn hash<H: Hasher>(&self, state: &mut H) {
 }
 
 impl OsStr {
-    /// Coerce into an `OsStr` slice.
+    /// Coerces into an `OsStr` slice.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn new<S: AsRef<OsStr> + ?Sized>(s: &S) -> &OsStr {
         s.as_ref()
     }
 
-    /// Coerce directly from a `&str` slice to a `&OsStr` slice.
+    /// Coerces directly from a `&str` slice to a `&OsStr` slice.
     #[stable(feature = "rust1", since = "1.0.0")]
     #[deprecated(since = "1.0.0",
                  reason = "use `OsStr::new` instead")]
@@ -235,7 +235,7 @@ pub fn from_str(s: &str) -> &OsStr {
         unsafe { mem::transmute(Slice::from_str(s)) }
     }
 
-    /// Yield a `&str` slice if the `OsStr` is valid unicode.
+    /// Yields a `&str` slice if the `OsStr` is valid unicode.
     ///
     /// This conversion may entail doing a check for UTF-8 validity.
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -243,7 +243,7 @@ pub fn to_str(&self) -> Option<&str> {
         self.inner.to_str()
     }
 
-    /// Convert an `OsStr` to a `Cow<str>`.
+    /// Converts an `OsStr` to a `Cow<str>`.
     ///
     /// Any non-Unicode sequences are replaced with U+FFFD REPLACEMENT CHARACTER.
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -251,13 +251,13 @@ pub fn to_string_lossy(&self) -> Cow<str> {
         self.inner.to_string_lossy()
     }
 
-    /// Copy the slice into an owned `OsString`.
+    /// Copies the slice into an owned `OsString`.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn to_os_string(&self) -> OsString {
         OsString { inner: self.inner.to_owned() }
     }
 
-    /// Yield this `OsStr` as a byte slice.
+    /// Yields this `OsStr` as a byte slice.
     ///
     /// # Platform behavior
     ///
@@ -275,7 +275,7 @@ pub fn to_bytes(&self) -> Option<&[u8]> {
         }
     }
 
-    /// Create a `CString` containing this `OsStr` data.
+    /// Creates a `CString` containing this `OsStr` data.
     ///
     /// Fails if the `OsStr` contains interior nulls.
     ///
@@ -287,7 +287,7 @@ pub fn to_cstring(&self) -> Option<CString> {
         self.to_bytes().and_then(|b| CString::new(b).ok())
     }
 
-    /// Get the underlying byte representation.
+    /// Gets the underlying byte representation.
     ///
     /// Note: it is *crucial* that this API is private, to avoid
     /// revealing the internal, platform-specific encodings.
index 914830d9dcfea20a84c4681e9409b90e419c62bd..cfa711db84d13e7ec49af46832509dd8482b856c 100644 (file)
@@ -171,7 +171,7 @@ pub fn open<P: AsRef<Path>>(path: P) -> io::Result<File> {
         OpenOptions::new().read(true).open(path)
     }
 
-    /// Open a file in write-only mode.
+    /// Opens a file in write-only mode.
     ///
     /// This function will create a file if it does not exist,
     /// and will truncate it if it does.
@@ -201,7 +201,7 @@ pub fn path(&self) -> Option<&Path> {
         self.path.as_ref().map(|p| &**p)
     }
 
-    /// Attempt to sync all OS-internal metadata to disk.
+    /// Attempts to sync all OS-internal metadata to disk.
     ///
     /// This function will attempt to ensure that all in-core data reaches the
     /// filesystem before returning.
@@ -362,7 +362,7 @@ pub fn new() -> OpenOptions {
         OpenOptions(fs_imp::OpenOptions::new())
     }
 
-    /// Set the option for read access.
+    /// Sets the option for read access.
     ///
     /// This option, when true, will indicate that the file should be
     /// `read`-able if opened.
@@ -379,7 +379,7 @@ pub fn read(&mut self, read: bool) -> &mut OpenOptions {
         self.0.read(read); self
     }
 
-    /// Set the option for write access.
+    /// Sets the option for write access.
     ///
     /// This option, when true, will indicate that the file should be
     /// `write`-able if opened.
@@ -396,7 +396,7 @@ pub fn write(&mut self, write: bool) -> &mut OpenOptions {
         self.0.write(write); self
     }
 
-    /// Set the option for the append mode.
+    /// Sets the option for the append mode.
     ///
     /// This option, when true, means that writes will append to a file instead
     /// of overwriting previous contents.
@@ -413,7 +413,7 @@ pub fn append(&mut self, append: bool) -> &mut OpenOptions {
         self.0.append(append); self
     }
 
-    /// Set the option for truncating a previous file.
+    /// Sets the option for truncating a previous file.
     ///
     /// If a file is successfully opened with this option set it will truncate
     /// the file to 0 length if it already exists.
@@ -430,7 +430,7 @@ pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions {
         self.0.truncate(truncate); self
     }
 
-    /// Set the option for creating a new file.
+    /// Sets the option for creating a new file.
     ///
     /// This option indicates whether a new file will be created if the file
     /// does not yet already exist.
@@ -447,7 +447,7 @@ pub fn create(&mut self, create: bool) -> &mut OpenOptions {
         self.0.create(create); self
     }
 
-    /// Open a file at `path` with the options specified by `self`.
+    /// Opens a file at `path` with the options specified by `self`.
     ///
     /// # Errors
     ///
@@ -587,7 +587,7 @@ impl Permissions {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn readonly(&self) -> bool { self.0.readonly() }
 
-    /// Modify the readonly flag for this set of permissions.
+    /// Modifies the readonly flag for this set of permissions.
     ///
     /// This operation does **not** modify the filesystem. To modify the
     /// filesystem use the `fs::set_permissions` function.
@@ -670,7 +670,7 @@ impl DirEntry {
     pub fn path(&self) -> PathBuf { self.0.path() }
 }
 
-/// Remove a file from the underlying filesystem.
+/// Removes a file from the underlying filesystem.
 ///
 /// Note that, just because an unlink call was successful, it is not
 /// guaranteed that a file is immediately deleted (e.g. depending on
@@ -856,7 +856,7 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
     fs_imp::readlink(path.as_ref())
 }
 
-/// Create a new, empty directory at the provided path
+/// Creates a new, empty directory at the provided path
 ///
 /// # Errors
 ///
@@ -906,7 +906,7 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
     create_dir(path)
 }
 
-/// Remove an existing, empty directory
+/// Removes an existing, empty directory.
 ///
 /// # Errors
 ///
@@ -1058,7 +1058,7 @@ fn next(&mut self) -> Option<io::Result<DirEntry>> {
            reason = "the precise set of methods exposed on this trait may \
                      change and some methods may be removed")]
 pub trait PathExt {
-    /// Get information on the file, directory, etc at this path.
+    /// Gets information on the file, directory, etc at this path.
     ///
     /// Consult the `fs::stat` documentation for more info.
     ///
index 6433c29bb9d6e456d0701828cd576c58d2afe591..72743106abf6a24ac589e0c852b960d7159c952e 100644 (file)
@@ -34,21 +34,21 @@ pub struct Cursor<T> {
 }
 
 impl<T> Cursor<T> {
-    /// Create a new cursor wrapping the provided underlying I/O object.
+    /// Creates a new cursor wrapping the provided underlying I/O object.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn new(inner: T) -> Cursor<T> {
         Cursor { pos: 0, inner: inner }
     }
 
-    /// Consume this cursor, returning the underlying value.
+    /// Consumes this cursor, returning the underlying value.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn into_inner(self) -> T { self.inner }
 
-    /// Get a reference to the underlying value in this cursor.
+    /// Gets a reference to the underlying value in this cursor.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn get_ref(&self) -> &T { &self.inner }
 
-    /// Get a mutable reference to the underlying value in this cursor.
+    /// Gets a mutable reference to the underlying value in this cursor.
     ///
     /// Care should be taken to avoid modifying the internal I/O state of the
     /// underlying value as it may corrupt this cursor's position.
index 7428d0a8e35ef1820a35bcf461437bc995771109..a49039b1ec4ee808497ad20186006c19be57efed 100644 (file)
@@ -191,7 +191,7 @@ pub fn raw_os_error(&self) -> Option<i32> {
         }
     }
 
-    /// Return the corresponding `ErrorKind` for this error.
+    /// Returns the corresponding `ErrorKind` for this error.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn kind(&self) -> ErrorKind {
         match self.repr {
index f0f37117ed3bebe582e79f541461c6fb5ee850fd..ef836a194618c666835f54f17697c0e7f9d0d7eb 100644 (file)
@@ -220,14 +220,14 @@ fn read_to_string(&mut self, buf: &mut String) -> Result<usize> {
         append_to_string(buf, |b| read_to_end(self, b))
     }
 
-    /// Create a "by reference" adaptor for this instance of `Read`.
+    /// Creates a "by reference" adaptor for this instance of `Read`.
     ///
     /// The returned adaptor also implements `Read` and will simply borrow this
     /// current reader.
     #[stable(feature = "rust1", since = "1.0.0")]
     fn by_ref(&mut self) -> &mut Self where Self: Sized { self }
 
-    /// Transform this `Read` instance to an `Iterator` over its bytes.
+    /// Transforms this `Read` instance to an `Iterator` over its bytes.
     ///
     /// The returned type implements `Iterator` where the `Item` is `Result<u8,
     /// R::Err>`.  The yielded item is `Ok` if a byte was successfully read and
@@ -238,7 +238,7 @@ fn bytes(self) -> Bytes<Self> where Self: Sized {
         Bytes { inner: self }
     }
 
-    /// Transform this `Read` instance to an `Iterator` over `char`s.
+    /// Transforms this `Read` instance to an `Iterator` over `char`s.
     ///
     /// This adaptor will attempt to interpret this reader as an UTF-8 encoded
     /// sequence of characters. The returned iterator will return `None` once
@@ -255,7 +255,7 @@ fn chars(self) -> Chars<Self> where Self: Sized {
         Chars { inner: self }
     }
 
-    /// Create an adaptor which will chain this stream with another.
+    /// Creates an adaptor which will chain this stream with another.
     ///
     /// The returned `Read` instance will first read all bytes from this object
     /// until EOF is encountered. Afterwards the output is equivalent to the
@@ -265,7 +265,7 @@ fn chain<R: Read>(self, next: R) -> Chain<Self, R> where Self: Sized {
         Chain { first: self, second: next, done_first: false }
     }
 
-    /// Create an adaptor which will read at most `limit` bytes from it.
+    /// Creates an adaptor which will read at most `limit` bytes from it.
     ///
     /// This function returns a new instance of `Read` which will read at most
     /// `limit` bytes, after which it will always return EOF (`Ok(0)`). Any
@@ -406,7 +406,7 @@ fn write_str(&mut self, s: &str) -> fmt::Result {
         }
     }
 
-    /// Create a "by reference" adaptor for this instance of `Write`.
+    /// Creates a "by reference" adaptor for this instance of `Write`.
     ///
     /// The returned adaptor also implements `Write` and will simply borrow this
     /// current writer.
index 2850d92e34d401152a378af9e60cb409bfacf497..cd6af77daa9061e00c094979d9bad3f64dc00c45 100644 (file)
@@ -45,7 +45,7 @@
 /// the `std::io::stdio::stderr_raw` function.
 struct StderrRaw(stdio::Stderr);
 
-/// Construct a new raw handle to the standard input of this process.
+/// Constructs a new raw handle to the standard input of this process.
 ///
 /// The returned handle does not interact with any other handles created nor
 /// handles returned by `std::io::stdin`. Data buffered by the `std::io::stdin`
@@ -54,7 +54,7 @@
 /// The returned handle has no external synchronization or buffering.
 fn stdin_raw() -> StdinRaw { StdinRaw(stdio::Stdin::new()) }
 
-/// Construct a new raw handle to the standard input stream of this process.
+/// Constructs a new raw handle to the standard input stream of this process.
 ///
 /// The returned handle does not interact with any other handles created nor
 /// handles returned by `std::io::stdout`. Note that data is buffered by the
@@ -65,7 +65,7 @@ fn stdin_raw() -> StdinRaw { StdinRaw(stdio::Stdin::new()) }
 /// top.
 fn stdout_raw() -> StdoutRaw { StdoutRaw(stdio::Stdout::new()) }
 
-/// Construct a new raw handle to the standard input stream of this process.
+/// Constructs a new raw handle to the standard input stream of this process.
 ///
 /// The returned handle does not interact with any other handles created nor
 /// handles returned by `std::io::stdout`.
@@ -109,7 +109,7 @@ pub struct StdinLock<'a> {
     inner: MutexGuard<'a, BufReader<StdinRaw>>,
 }
 
-/// Create a new handle to the global standard input stream of this process.
+/// Creates a new handle to the global standard input stream of this process.
 ///
 /// The handle returned refers to a globally shared buffer between all threads.
 /// Access is synchronized and can be explicitly controlled with the `lock()`
@@ -139,7 +139,7 @@ fn stdin_init() -> Arc<Mutex<BufReader<StdinRaw>>> {
 }
 
 impl Stdin {
-    /// Lock this handle to the standard input stream, returning a readable
+    /// Locks this handle to the standard input stream, returning a readable
     /// guard.
     ///
     /// The lock is released when the returned lock goes out of scope. The
@@ -243,7 +243,7 @@ fn stdout_init() -> Arc<ReentrantMutex<RefCell<LineWriter<StdoutRaw>>>> {
 }
 
 impl Stdout {
-    /// Lock this handle to the standard output stream, returning a writable
+    /// Locks this handle to the standard output stream, returning a writable
     /// guard.
     ///
     /// The lock is released when the returned lock goes out of scope. The
@@ -315,7 +315,7 @@ fn stderr_init() -> Arc<ReentrantMutex<RefCell<StderrRaw>>> {
 }
 
 impl Stderr {
-    /// Lock this handle to the standard error stream, returning a writable
+    /// Locks this handle to the standard error stream, returning a writable
     /// guard.
     ///
     /// The lock is released when the returned lock goes out of scope. The
index c8b1928747705765c1cc1923b8a2ea6a60b0d6d1..8d4af4689af293b42da223ea2132bf9c6cef2271 100644 (file)
@@ -58,7 +58,7 @@ pub enum Ipv6MulticastScope {
 }
 
 impl Ipv4Addr {
-    /// Create a new IPv4 address from four eight-bit octets.
+    /// Creates a new IPv4 address from four eight-bit octets.
     ///
     /// The result will represent the IP address a.b.c.d
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -127,7 +127,7 @@ pub fn is_multicast(&self) -> bool {
         self.octets()[0] >= 224 && self.octets()[0] <= 239
     }
 
-    /// Convert this address to an IPv4-compatible IPv6 address
+    /// Converts this address to an IPv4-compatible IPv6 address
     ///
     /// a.b.c.d becomes ::a.b.c.d
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -137,7 +137,7 @@ pub fn to_ipv6_compatible(&self) -> Ipv6Addr {
                       ((self.octets()[2] as u16) << 8) | self.octets()[3] as u16)
     }
 
-    /// Convert this address to an IPv4-mapped IPv6 address
+    /// Converts this address to an IPv4-mapped IPv6 address
     ///
     /// a.b.c.d becomes ::ffff:a.b.c.d
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -220,7 +220,7 @@ fn from_inner(addr: libc::in_addr) -> Ipv4Addr {
 }
 
 impl Ipv6Addr {
-    /// Create a new IPv6 address from eight 16-bit segments.
+    /// Creates a new IPv6 address from eight 16-bit segments.
     ///
     /// The result will represent the IP address a:b:c:d:e:f:g:h
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -234,7 +234,7 @@ pub fn new(a: u16, b: u16, c: u16, d: u16, e: u16, f: u16, g: u16,
         }
     }
 
-    /// Return the eight 16-bit segments that make up this address
+    /// Returns the eight 16-bit segments that make up this address
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn segments(&self) -> [u16; 8] {
         [ntoh(self.inner.s6_addr[0]),
@@ -324,7 +324,7 @@ pub fn is_multicast(&self) -> bool {
         (self.segments()[0] & 0xff00) == 0xff00
     }
 
-    /// Convert this address to an IPv4 address. Returns None if this address is
+    /// Converts this address to an IPv4 address. Returns None if this address is
     /// neither IPv4-compatible or IPv4-mapped.
     ///
     /// ::a.b.c.d and ::ffff:a.b.c.d become a.b.c.d
index 2da6f7420ac9d31b7e7f26dbb94b992f8ebdd268..209a0032fb4419712fa2875eefd38a590971953d 100644 (file)
@@ -82,7 +82,7 @@
 pub struct Incoming<'a> { listener: &'a TcpListener }
 
 impl TcpStream {
-    /// Open a TCP connection to a remote host.
+    /// Opens a TCP connection to a remote host.
     ///
     /// `addr` is an address of the remote host. Anything which implements
     /// `ToSocketAddrs` trait can be supplied for the address; see this trait
@@ -104,7 +104,7 @@ pub fn local_addr(&self) -> io::Result<SocketAddr> {
         self.0.socket_addr()
     }
 
-    /// Shut down the read, write, or both halves of this connection.
+    /// Shuts down the read, write, or both halves of this connection.
     ///
     /// This function will cause all pending and future I/O on the specified
     /// portions to return immediately with an appropriate value (see the
@@ -114,7 +114,7 @@ pub fn shutdown(&self, how: Shutdown) -> io::Result<()> {
         self.0.shutdown(how)
     }
 
-    /// Create a new independently owned handle to the underlying socket.
+    /// Creates a new independently owned handle to the underlying socket.
     ///
     /// The returned `TcpStream` is a reference to the same stream that this
     /// object references. Both handles will read and write the same stream of
@@ -190,7 +190,7 @@ pub fn local_addr(&self) -> io::Result<SocketAddr> {
         self.0.socket_addr()
     }
 
-    /// Create a new independently owned handle to the underlying socket.
+    /// Creates a new independently owned handle to the underlying socket.
     ///
     /// The returned `TcpListener` is a reference to the same socket that this
     /// object references. Both handles can be used to accept incoming
index bec9c09bc314676ec35fb91f8d373d3d033f3fbe..1955b895300ead37b634f3e191f32129b284396e 100644 (file)
@@ -85,7 +85,7 @@ pub fn local_addr(&self) -> io::Result<SocketAddr> {
         self.0.socket_addr()
     }
 
-    /// Create a new independently owned handle to the underlying socket.
+    /// Creates a new independently owned handle to the underlying socket.
     ///
     /// The returned `UdpSocket` is a reference to the same socket that this
     /// object references. Both handles will read and write the same port, and
@@ -100,7 +100,7 @@ pub fn set_broadcast(&self, on: bool) -> io::Result<()> {
         self.0.set_broadcast(on)
     }
 
-    /// Set the multicast loop flag to the specified value
+    /// Sets the multicast loop flag to the specified value
     ///
     /// This lets multicast packets loop back to local sockets (if enabled)
     pub fn set_multicast_loop(&self, on: bool) -> io::Result<()> {
index 6128469c60e50cb2b4f39d45445637b7500c7686..736f6d2f4f4f834f96894ff98161b1b6ffffef01 100644 (file)
@@ -527,7 +527,7 @@ pub fn ceil(self) -> f32 { num::Float::ceil(self) }
     #[inline]
     pub fn round(self) -> f32 { num::Float::round(self) }
 
-    /// Return the integer part of a number.
+    /// Returns the integer part of a number.
     ///
     /// ```
     /// let f = 3.3_f32;
@@ -666,7 +666,7 @@ pub fn is_negative(self) -> bool { num::Float::is_negative(self) }
     #[inline]
     pub fn mul_add(self, a: f32, b: f32) -> f32 { num::Float::mul_add(self, a, b) }
 
-    /// Take the reciprocal (inverse) of a number, `1/x`.
+    /// Takes the reciprocal (inverse) of a number, `1/x`.
     ///
     /// ```
     /// use std::f32;
@@ -680,7 +680,7 @@ pub fn mul_add(self, a: f32, b: f32) -> f32 { num::Float::mul_add(self, a, b) }
     #[inline]
     pub fn recip(self) -> f32 { num::Float::recip(self) }
 
-    /// Raise a number to an integer power.
+    /// Raises a number to an integer power.
     ///
     /// Using this function is generally faster than using `powf`
     ///
@@ -696,7 +696,7 @@ pub fn recip(self) -> f32 { num::Float::recip(self) }
     #[inline]
     pub fn powi(self, n: i32) -> f32 { num::Float::powi(self, n) }
 
-    /// Raise a number to a floating point power.
+    /// Raises a number to a floating point power.
     ///
     /// ```
     /// use std::f32;
@@ -710,7 +710,7 @@ pub fn powi(self, n: i32) -> f32 { num::Float::powi(self, n) }
     #[inline]
     pub fn powf(self, n: f32) -> f32 { num::Float::powf(self, n) }
 
-    /// Take the square root of a number.
+    /// Takes the square root of a number.
     ///
     /// Returns NaN if `self` is a negative number.
     ///
@@ -729,7 +729,7 @@ pub fn powf(self, n: f32) -> f32 { num::Float::powf(self, n) }
     #[inline]
     pub fn sqrt(self) -> f32 { num::Float::sqrt(self) }
 
-    /// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
+    /// Takes the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
     ///
     /// ```
     /// # #![feature(std_misc)]
@@ -852,7 +852,7 @@ pub fn log2(self) -> f32 { num::Float::log2(self) }
     #[inline]
     pub fn log10(self) -> f32 { num::Float::log10(self) }
 
-    /// Convert radians to degrees.
+    /// Converts radians to degrees.
     ///
     /// ```
     /// # #![feature(std_misc)]
@@ -868,7 +868,7 @@ pub fn log10(self) -> f32 { num::Float::log10(self) }
     #[inline]
     pub fn to_degrees(self) -> f32 { num::Float::to_degrees(self) }
 
-    /// Convert degrees to radians.
+    /// Converts degrees to radians.
     ///
     /// ```
     /// # #![feature(std_misc)]
@@ -1003,7 +1003,7 @@ pub fn abs_sub(self, other: f32) -> f32 {
         unsafe { cmath::fdimf(self, other) }
     }
 
-    /// Take the cubic root of a number.
+    /// Takes the cubic root of a number.
     ///
     /// ```
     /// use std::f32;
@@ -1021,7 +1021,7 @@ pub fn cbrt(self) -> f32 {
         unsafe { cmath::cbrtf(self) }
     }
 
-    /// Calculate the length of the hypotenuse of a right-angle triangle given
+    /// Calculates the length of the hypotenuse of a right-angle triangle given
     /// legs of length `x` and `y`.
     ///
     /// ```
index 794853f6f709863f4237391e0bd6f22211ec2212..bb9067eca13dd85557bf6d88f75a26c126bedd51 100644 (file)
@@ -534,7 +534,7 @@ pub fn ceil(self) -> f64 { num::Float::ceil(self) }
     #[inline]
     pub fn round(self) -> f64 { num::Float::round(self) }
 
-    /// Return the integer part of a number.
+    /// Returns the integer part of a number.
     ///
     /// ```
     /// let f = 3.3_f64;
@@ -671,7 +671,7 @@ pub fn is_negative(self) -> bool { num::Float::is_negative(self) }
     #[inline]
     pub fn mul_add(self, a: f64, b: f64) -> f64 { num::Float::mul_add(self, a, b) }
 
-    /// Take the reciprocal (inverse) of a number, `1/x`.
+    /// Takes the reciprocal (inverse) of a number, `1/x`.
     ///
     /// ```
     /// let x = 2.0_f64;
@@ -683,7 +683,7 @@ pub fn mul_add(self, a: f64, b: f64) -> f64 { num::Float::mul_add(self, a, b) }
     #[inline]
     pub fn recip(self) -> f64 { num::Float::recip(self) }
 
-    /// Raise a number to an integer power.
+    /// Raises a number to an integer power.
     ///
     /// Using this function is generally faster than using `powf`
     ///
@@ -697,7 +697,7 @@ pub fn recip(self) -> f64 { num::Float::recip(self) }
     #[inline]
     pub fn powi(self, n: i32) -> f64 { num::Float::powi(self, n) }
 
-    /// Raise a number to a floating point power.
+    /// Raises a number to a floating point power.
     ///
     /// ```
     /// let x = 2.0_f64;
@@ -709,7 +709,7 @@ pub fn powi(self, n: i32) -> f64 { num::Float::powi(self, n) }
     #[inline]
     pub fn powf(self, n: f64) -> f64 { num::Float::powf(self, n) }
 
-    /// Take the square root of a number.
+    /// Takes the square root of a number.
     ///
     /// Returns NaN if `self` is a negative number.
     ///
@@ -726,7 +726,7 @@ pub fn powf(self, n: f64) -> f64 { num::Float::powf(self, n) }
     #[inline]
     pub fn sqrt(self) -> f64 { num::Float::sqrt(self) }
 
-    /// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
+    /// Takes the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
     ///
     /// ```
     /// # #![feature(std_misc)]
@@ -835,7 +835,7 @@ pub fn log2(self) -> f64 { num::Float::log2(self) }
     #[inline]
     pub fn log10(self) -> f64 { num::Float::log10(self) }
 
-    /// Convert radians to degrees.
+    /// Converts radians to degrees.
     ///
     /// ```
     /// use std::f64::consts;
@@ -850,7 +850,7 @@ pub fn log10(self) -> f64 { num::Float::log10(self) }
     #[inline]
     pub fn to_degrees(self) -> f64 { num::Float::to_degrees(self) }
 
-    /// Convert degrees to radians.
+    /// Converts degrees to radians.
     ///
     /// ```
     /// use std::f64::consts;
@@ -978,7 +978,7 @@ pub fn abs_sub(self, other: f64) -> f64 {
         unsafe { cmath::fdim(self, other) }
     }
 
-    /// Take the cubic root of a number.
+    /// Takes the cubic root of a number.
     ///
     /// ```
     /// let x = 8.0_f64;
@@ -994,7 +994,7 @@ pub fn cbrt(self) -> f64 {
         unsafe { cmath::cbrt(self) }
     }
 
-    /// Calculate the length of the hypotenuse of a right-angle triangle given
+    /// Calculates the length of the hypotenuse of a right-angle triangle given
     /// legs of length `x` and `y`.
     ///
     /// ```
index ea516e5b20b7a35199395f6a6dab0dfd8d6f50eb..e0b9c720dbbed82b9be59c9e95ffd81df227ee33 100644 (file)
@@ -383,7 +383,7 @@ pub trait Float
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn round(self) -> Self;
-    /// Return the integer part of a number.
+    /// Returns the integer part of a number.
     ///
     /// ```
     /// use std::num::Float;
@@ -509,7 +509,7 @@ pub trait Float
     #[unstable(feature = "std_misc",
                reason = "unsure about its place in the world")]
     fn mul_add(self, a: Self, b: Self) -> Self;
-    /// Take the reciprocal (inverse) of a number, `1/x`.
+    /// Takes the reciprocal (inverse) of a number, `1/x`.
     ///
     /// ```
     /// # #![feature(std_misc)]
@@ -524,7 +524,7 @@ pub trait Float
                reason = "unsure about its place in the world")]
     fn recip(self) -> Self;
 
-    /// Raise a number to an integer power.
+    /// Raises a number to an integer power.
     ///
     /// Using this function is generally faster than using `powf`
     ///
@@ -538,7 +538,7 @@ pub trait Float
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn powi(self, n: i32) -> Self;
-    /// Raise a number to a floating point power.
+    /// Raises a number to a floating point power.
     ///
     /// ```
     /// use std::num::Float;
@@ -550,7 +550,7 @@ pub trait Float
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn powf(self, n: Self) -> Self;
-    /// Take the square root of a number.
+    /// Takes the square root of a number.
     ///
     /// Returns NaN if `self` is a negative number.
     ///
@@ -569,7 +569,7 @@ pub trait Float
     #[stable(feature = "rust1", since = "1.0.0")]
     fn sqrt(self) -> Self;
 
-    /// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
+    /// Takes the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
     ///
     /// ```
     /// # #![feature(std_misc)]
@@ -679,7 +679,7 @@ pub trait Float
     #[stable(feature = "rust1", since = "1.0.0")]
     fn log10(self) -> Self;
 
-    /// Convert radians to degrees.
+    /// Converts radians to degrees.
     ///
     /// ```
     /// use std::num::Float;
@@ -693,7 +693,7 @@ pub trait Float
     /// ```
     #[unstable(feature = "std_misc", reason = "desirability is unclear")]
     fn to_degrees(self) -> Self;
-    /// Convert degrees to radians.
+    /// Converts degrees to radians.
     ///
     /// ```
     /// # #![feature(std_misc)]
@@ -807,7 +807,7 @@ pub trait Float
     /// ```
     #[unstable(feature = "std_misc", reason = "may be renamed")]
     fn abs_sub(self, other: Self) -> Self;
-    /// Take the cubic root of a number.
+    /// Takes the cubic root of a number.
     ///
     /// ```
     /// # #![feature(std_misc)]
@@ -822,7 +822,7 @@ pub trait Float
     /// ```
     #[unstable(feature = "std_misc", reason = "may be renamed")]
     fn cbrt(self) -> Self;
-    /// Calculate the length of the hypotenuse of a right-angle triangle given
+    /// Calculates the length of the hypotenuse of a right-angle triangle given
     /// legs of length `x` and `y`.
     ///
     /// ```
index 4471b5afa84c888b600cd0def724eca4013466c8..cdc5cecbf380a8f95bdaf280af6fdfe37180507d 100644 (file)
@@ -312,7 +312,7 @@ fn os_str_len(s: &OsStr) -> usize {
 
     }
 
-    /// Determine if the prefix is verbatim, i.e. begins `\\?\`.
+    /// Determines if the prefix is verbatim, i.e. begins `\\?\`.
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn is_verbatim(&self) -> bool {
@@ -341,7 +341,7 @@ fn has_implicit_root(&self) -> bool {
 // Exposed parsing helpers
 ////////////////////////////////////////////////////////////////////////////////
 
-/// Determine whether the character is one of the permitted path
+/// Determines whether the character is one of the permitted path
 /// separators for the current platform.
 ///
 /// # Examples
@@ -524,7 +524,7 @@ pub enum Component<'a> {
 }
 
 impl<'a> Component<'a> {
-    /// Extract the underlying `OsStr` slice
+    /// Extracts the underlying `OsStr` slice
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn as_os_str(self) -> &'a OsStr {
         match self {
@@ -629,7 +629,7 @@ fn is_sep_byte(&self, b: u8) -> bool {
         }
     }
 
-    /// Extract a slice corresponding to the portion of the path remaining for iteration.
+    /// Extracts a slice corresponding to the portion of the path remaining for iteration.
     ///
     /// # Examples
     ///
@@ -750,7 +750,7 @@ fn as_ref(&self) -> &OsStr {
 }
 
 impl<'a> Iter<'a> {
-    /// Extract a slice corresponding to the portion of the path remaining for iteration.
+    /// Extracts a slice corresponding to the portion of the path remaining for iteration.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn as_path(&self) -> &'a Path {
         self.inner.as_path()
@@ -941,19 +941,19 @@ fn as_mut_vec(&mut self) -> &mut Vec<u8> {
         unsafe { mem::transmute(self) }
     }
 
-    /// Allocate an empty `PathBuf`.
+    /// Allocates an empty `PathBuf`.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn new() -> PathBuf {
         PathBuf { inner: OsString::new() }
     }
 
-    /// Coerce to a `Path` slice.
+    /// Coerces to a `Path` slice.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn as_path(&self) -> &Path {
         self
     }
 
-    /// Extend `self` with `path`.
+    /// Extends `self` with `path`.
     ///
     /// If `path` is absolute, it replaces the current path.
     ///
@@ -1064,7 +1064,7 @@ pub fn set_extension<S: AsRef<OsStr>>(&mut self, extension: S) -> bool {
         true
     }
 
-    /// Consume the `PathBuf`, yielding its internal `OsString` storage
+    /// Consumes the `PathBuf`, yielding its internal `OsString` storage.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn into_os_string(self) -> OsString {
         self.inner
@@ -1254,7 +1254,7 @@ pub fn new<S: AsRef<OsStr> + ?Sized>(s: &S) -> &Path {
         unsafe { mem::transmute(s.as_ref()) }
     }
 
-    /// Yield the underlying `OsStr` slice.
+    /// Yields the underlying `OsStr` slice.
     ///
     /// # Examples
     ///
@@ -1268,7 +1268,7 @@ pub fn as_os_str(&self) -> &OsStr {
         &self.inner
     }
 
-    /// Yield a `&str` slice if the `Path` is valid unicode.
+    /// Yields a `&str` slice if the `Path` is valid unicode.
     ///
     /// This conversion may entail doing a check for UTF-8 validity.
     ///
@@ -1284,7 +1284,7 @@ pub fn to_str(&self) -> Option<&str> {
         self.inner.to_str()
     }
 
-    /// Convert a `Path` to a `Cow<str>`.
+    /// Converts a `Path` to a `Cow<str>`.
     ///
     /// Any non-Unicode sequences are replaced with U+FFFD REPLACEMENT CHARACTER.
     ///
@@ -1300,7 +1300,7 @@ pub fn to_string_lossy(&self) -> Cow<str> {
         self.inner.to_string_lossy()
     }
 
-    /// Convert a `Path` to an owned `PathBuf`.
+    /// Converts a `Path` to an owned `PathBuf`.
     ///
     /// # Examples
     ///
@@ -1477,7 +1477,7 @@ pub fn ends_with<P: AsRef<Path>>(&self, child: P) -> bool {
         iter_after(self.components().rev(), child.as_ref().components().rev()).is_some()
     }
 
-    /// Extract the stem (non-extension) portion of `self.file()`.
+    /// Extracts the stem (non-extension) portion of `self.file()`.
     ///
     /// The stem is:
     ///
@@ -1500,7 +1500,7 @@ pub fn file_stem(&self) -> Option<&OsStr> {
         self.file_name().map(split_file_at_dot).and_then(|(before, after)| before.or(after))
     }
 
-    /// Extract the extension of `self.file()`, if possible.
+    /// Extracts the extension of `self.file()`, if possible.
     ///
     /// The extension is:
     ///
@@ -1714,7 +1714,7 @@ fn cmp(&self, other: &Path) -> cmp::Ordering {
 #[unstable(feature = "std_misc")]
 #[deprecated(since = "1.0.0", reason = "use std::convert::AsRef<Path> instead")]
 pub trait AsPath {
-    /// Convert to a `Path`.
+    /// Converts to a `Path`.
     #[unstable(feature = "std_misc")]
     fn as_path(&self) -> &Path;
 }
index cac1540d0ec4c4fee8f7253d20b4ee8dd643e7db..7306dd3826062a84bb302c9ed248b09f150d02f8 100644 (file)
@@ -194,7 +194,7 @@ pub fn env_clear(&mut self) -> &mut Command {
         self
     }
 
-    /// Set the working directory for the child process.
+    /// Sets the working directory for the child process.
     #[stable(feature = "process", since = "1.0.0")]
     pub fn current_dir<P: AsRef<path::Path>>(&mut self, dir: P) -> &mut Command {
         self.inner.cwd(dir.as_ref().as_ref());
@@ -396,7 +396,7 @@ pub fn success(&self) -> bool {
         self.0.success()
     }
 
-    /// Return the exit code of the process, if any.
+    /// Returns the exit code of the process, if any.
     ///
     /// On Unix, this will return `None` if the process was terminated
     /// by a signal; `std::os::unix` provides an extension trait for
@@ -453,7 +453,7 @@ pub fn kill(&mut self) -> io::Result<()> {
         unsafe { self.handle.kill() }
     }
 
-    /// Wait for the child to exit completely, returning the status that it
+    /// Waits for the child to exit completely, returning the status that it
     /// exited with. This function will continue to have the same return value
     /// after it has been called at least once.
     ///
@@ -474,7 +474,7 @@ pub fn wait(&mut self) -> io::Result<ExitStatus> {
         }
     }
 
-    /// Simultaneously wait for the child to exit and collect all remaining
+    /// Simultaneously waits for the child to exit and collect all remaining
     /// output on the stdout/stderr handles, returning a `Output`
     /// instance.
     ///
index ebf4d3377499e99188b372b54ec5ff091ff6bc2a..34fcf6cdadd304165d2bc29cfc677ed5f212abe1 100644 (file)
@@ -49,7 +49,7 @@ struct BarrierState {
 pub struct BarrierWaitResult(bool);
 
 impl Barrier {
-    /// Create a new barrier that can block a given number of threads.
+    /// Creates a new barrier that can block a given number of threads.
     ///
     /// A barrier will block `n`-1 threads which call `wait` and then wake up
     /// all threads at once when the `n`th thread calls `wait`.
@@ -65,7 +65,7 @@ pub fn new(n: usize) -> Barrier {
         }
     }
 
-    /// Block the current thread until all threads has rendezvoused here.
+    /// Blocks the current thread until all threads has rendezvoused here.
     ///
     /// Barriers are re-usable after all threads have rendezvoused once, and can
     /// be used continuously.
@@ -97,7 +97,7 @@ pub fn wait(&self) -> BarrierWaitResult {
 }
 
 impl BarrierWaitResult {
-    /// Return whether this thread from `wait` is the "leader thread".
+    /// Returns whether this thread from `wait` is the "leader thread".
     ///
     /// Only one thread will have `true` returned from their result, all other
     /// threads will have `false` returned.
index 654b33f1a579d1f5372093adcd8fb117af0d3881..fcb0d2c0b2d38bbe60e00117b1315e1515c15d90 100644 (file)
@@ -102,7 +102,7 @@ pub fn new() -> Condvar {
         }
     }
 
-    /// Block the current thread until this condition variable receives a
+    /// Blocks the current thread until this condition variable receives a
     /// notification.
     ///
     /// This function will atomically unlock the mutex specified (represented by
@@ -137,7 +137,7 @@ pub fn wait<'a, T>(&self, guard: MutexGuard<'a, T>)
         }
     }
 
-    /// Wait on this condition variable for a notification, timing out after a
+    /// Waits on this condition variable for a notification, timing out after a
     /// specified duration.
     ///
     /// The semantics of this function are equivalent to `wait()`
@@ -169,7 +169,7 @@ pub fn wait_timeout<'a, T>(&self, guard: MutexGuard<'a, T>, dur: Duration)
         self.wait_timeout_ms(guard, dur.num_milliseconds() as u32)
     }
 
-    /// Wait on this condition variable for a notification, timing out after a
+    /// Waits on this condition variable for a notification, timing out after a
     /// specified duration.
     ///
     /// The semantics of this function are equivalent to `wait_timeout` except
@@ -189,7 +189,7 @@ pub fn wait_timeout_with<'a, T, F>(&self,
         }
     }
 
-    /// Wake up one blocked thread on this condvar.
+    /// Wakes up one blocked thread on this condvar.
     ///
     /// If there is a blocked thread on this condition variable, then it will
     /// be woken up from its call to `wait` or `wait_timeout`. Calls to
@@ -199,7 +199,7 @@ pub fn wait_timeout_with<'a, T, F>(&self,
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn notify_one(&self) { unsafe { self.inner.inner.notify_one() } }
 
-    /// Wake up all blocked threads on this condvar.
+    /// Wakes up all blocked threads on this condvar.
     ///
     /// This method will ensure that any current waiters on the condition
     /// variable are awoken. Calls to `notify_all()` are not buffered in any
@@ -218,7 +218,7 @@ fn drop(&mut self) {
 }
 
 impl StaticCondvar {
-    /// Block the current thread until this condition variable receives a
+    /// Blocks the current thread until this condition variable receives a
     /// notification.
     ///
     /// See `Condvar::wait`.
@@ -239,7 +239,7 @@ pub fn wait<'a, T>(&'static self, guard: MutexGuard<'a, T>)
         }
     }
 
-    /// Wait on this condition variable for a notification, timing out after a
+    /// Waits on this condition variable for a notification, timing out after a
     /// specified duration.
     ///
     /// See `Condvar::wait_timeout`.
@@ -260,7 +260,7 @@ pub fn wait_timeout_ms<'a, T>(&'static self, guard: MutexGuard<'a, T>, ms: u32)
         }
     }
 
-    /// Wait on this condition variable for a notification, timing out after a
+    /// Waits on this condition variable for a notification, timing out after a
     /// specified duration.
     ///
     /// The implementation will repeatedly wait while the duration has not
@@ -306,21 +306,21 @@ pub fn wait_timeout_with<'a, T, F>(&'static self,
         poison::map_result(guard_result, |g| (g, true))
     }
 
-    /// Wake up one blocked thread on this condvar.
+    /// Wakes up one blocked thread on this condvar.
     ///
     /// See `Condvar::notify_one`.
     #[unstable(feature = "std_misc",
                reason = "may be merged with Condvar in the future")]
     pub fn notify_one(&'static self) { unsafe { self.inner.notify_one() } }
 
-    /// Wake up all blocked threads on this condvar.
+    /// Wakes up all blocked threads on this condvar.
     ///
     /// See `Condvar::notify_all`.
     #[unstable(feature = "std_misc",
                reason = "may be merged with Condvar in the future")]
     pub fn notify_all(&'static self) { unsafe { self.inner.notify_all() } }
 
-    /// Deallocate all resources associated with this static condvar.
+    /// Deallocates all resources associated with this static condvar.
     ///
     /// This method is unsafe to call as there is no guarantee that there are no
     /// active users of the condvar, and this also doesn't prevent any future
index 93b27b6ce9efdc7f9cc3ad54e00553ee0e559348..422439fadc1a1b77255d220977b180936a6593f4 100644 (file)
@@ -750,7 +750,7 @@ pub fn try_recv(&self) -> Result<T, TryRecvError> {
         }
     }
 
-    /// Attempt to wait for a value on this receiver, returning an error if the
+    /// Attempts to wait for a value on this receiver, returning an error if the
     /// corresponding channel has hung up.
     ///
     /// This function will always block the current thread if there is no data
index b509b3472ee413276ecf52c78c64da05e97f4e2b..b8ad92841f2de65a8a7e8ef3df3a17886829fb6e 100644 (file)
@@ -254,11 +254,11 @@ fn iter(&self) -> Packets { Packets { cur: self.head } }
 }
 
 impl<'rx, T: Send> Handle<'rx, T> {
-    /// Retrieve the id of this handle.
+    /// Retrieves the id of this handle.
     #[inline]
     pub fn id(&self) -> usize { self.id }
 
-    /// Block to receive a value on the underlying receiver, returning `Some` on
+    /// Blocks to receive a value on the underlying receiver, returning `Some` on
     /// success or `None` if the channel disconnects. This function has the same
     /// semantics as `Receiver.recv`
     pub fn recv(&mut self) -> Result<T, RecvError> { self.rx.recv() }
index 46fb20cd6a2d69356b5f93fe38a9ef50bc7af725..7896870ea07e0c5060019da93ded747edc094a52 100644 (file)
@@ -232,7 +232,7 @@ pub fn try_lock(&self) -> TryLockResult<MutexGuard<T>> {
         }
     }
 
-    /// Determine whether the lock is poisoned.
+    /// Determines whether the lock is poisoned.
     ///
     /// If another thread is active, the lock can still become poisoned at any
     /// time.  You should not trust a `false` value for program correctness
index 258cf1d38a8ca887369ffb830f2aa6410386c584..948965f5efa9d157dca85f7e0121eba169546dc0 100644 (file)
@@ -51,7 +51,7 @@ pub struct Once {
 };
 
 impl Once {
-    /// Perform an initialization routine once and only once. The given closure
+    /// Performs an initialization routine once and only once. The given closure
     /// will be executed if this is the first time `call_once` has been called,
     /// and otherwise the routine will *not* be invoked.
     ///
index eb6d46a5dda7a160e3a4212140def19945804481..1ea92d5eff7fe92b4e019880ec46360209145ad6 100644 (file)
@@ -169,7 +169,7 @@ pub fn read(&self) -> LockResult<RwLockReadGuard<T>> {
         RwLockReadGuard::new(&*self.inner, &self.data)
     }
 
-    /// Attempt to acquire this lock with shared read access.
+    /// Attempts to acquire this lock with shared read access.
     ///
     /// This function will never block and will return immediately if `read`
     /// would otherwise succeed. Returns `Some` of an RAII guard which will
@@ -194,7 +194,7 @@ pub fn try_read(&self) -> TryLockResult<RwLockReadGuard<T>> {
         }
     }
 
-    /// Lock this rwlock with exclusive write access, blocking the current
+    /// Locks this rwlock with exclusive write access, blocking the current
     /// thread until it can be acquired.
     ///
     /// This function will not return while other writers or other readers
@@ -215,7 +215,7 @@ pub fn write(&self) -> LockResult<RwLockWriteGuard<T>> {
         RwLockWriteGuard::new(&*self.inner, &self.data)
     }
 
-    /// Attempt to lock this rwlock with exclusive write access.
+    /// Attempts to lock this rwlock with exclusive write access.
     ///
     /// This function does not ever block, and it will return `None` if a call
     /// to `write` would otherwise block. If successful, an RAII guard is
@@ -237,7 +237,7 @@ pub fn try_write(&self) -> TryLockResult<RwLockWriteGuard<T>> {
         }
     }
 
-    /// Determine whether the lock is poisoned.
+    /// Determines whether the lock is poisoned.
     ///
     /// If another thread is active, the lock can still become poisoned at any
     /// time.  You should not trust a `false` value for program correctness
@@ -287,7 +287,7 @@ pub fn read(&'static self) -> LockResult<RwLockReadGuard<'static, ()>> {
         RwLockReadGuard::new(self, &DUMMY.0)
     }
 
-    /// Attempt to acquire this lock with shared read access.
+    /// Attempts to acquire this lock with shared read access.
     ///
     /// See `RwLock::try_read`.
     #[inline]
@@ -302,7 +302,7 @@ pub fn try_read(&'static self)
         }
     }
 
-    /// Lock this rwlock with exclusive write access, blocking the current
+    /// Locks this rwlock with exclusive write access, blocking the current
     /// thread until it can be acquired.
     ///
     /// See `RwLock::write`.
@@ -314,7 +314,7 @@ pub fn write(&'static self) -> LockResult<RwLockWriteGuard<'static, ()>> {
         RwLockWriteGuard::new(self, &DUMMY.0)
     }
 
-    /// Attempt to lock this rwlock with exclusive write access.
+    /// Attempts to lock this rwlock with exclusive write access.
     ///
     /// See `RwLock::try_write`.
     #[inline]
@@ -329,7 +329,7 @@ pub fn try_write(&'static self)
         }
     }
 
-    /// Deallocate all resources associated with this static lock.
+    /// Deallocates all resources associated with this static lock.
     ///
     /// This method is unsafe to call as there is no guarantee that there are no
     /// active users of the lock, and this also doesn't prevent any future users
index 32fa6ec590335d3695062fd31bbf84a43e64e5fc..9f46b0c38248fef95129fdea634311bee4552f29 100644 (file)
@@ -31,15 +31,15 @@ impl Condvar {
     #[inline]
     pub unsafe fn new() -> Condvar { Condvar(imp::Condvar::new()) }
 
-    /// Signal one waiter on this condition variable to wake up.
+    /// Signals one waiter on this condition variable to wake up.
     #[inline]
     pub unsafe fn notify_one(&self) { self.0.notify_one() }
 
-    /// Awaken all current waiters on this condition variable.
+    /// Awakens all current waiters on this condition variable.
     #[inline]
     pub unsafe fn notify_all(&self) { self.0.notify_all() }
 
-    /// Wait for a signal on the specified mutex.
+    /// Waits for a signal on the specified mutex.
     ///
     /// Behavior is undefined if the mutex is not locked by the current thread.
     /// Behavior is also undefined if more than one mutex is used concurrently
@@ -47,7 +47,7 @@ pub unsafe fn notify_all(&self) { self.0.notify_all() }
     #[inline]
     pub unsafe fn wait(&self, mutex: &Mutex) { self.0.wait(mutex::raw(mutex)) }
 
-    /// Wait for a signal on the specified mutex with a timeout duration
+    /// Waits for a signal on the specified mutex with a timeout duration
     /// specified by `dur` (a relative time into the future).
     ///
     /// Behavior is undefined if the mutex is not locked by the current thread.
@@ -58,7 +58,7 @@ pub unsafe fn wait_timeout(&self, mutex: &Mutex, dur: Duration) -> bool {
         self.0.wait_timeout(mutex::raw(mutex), dur)
     }
 
-    /// Deallocate all resources associated with this condition variable.
+    /// Deallocates all resources associated with this condition variable.
     ///
     /// Behavior is undefined if there are current or will be future users of
     /// this condition variable.
index 0ca228267003db79e76a9e5b96a06dd1eed35b41..1f9dd54192ccaeae9170b4e58162b893c2551bf7 100644 (file)
@@ -24,14 +24,14 @@ unsafe impl Sync for Mutex {}
 pub const MUTEX_INIT: Mutex = Mutex(imp::MUTEX_INIT);
 
 impl Mutex {
-    /// Lock the mutex blocking the current thread until it is available.
+    /// Locks the mutex blocking the current thread until it is available.
     ///
     /// Behavior is undefined if the mutex has been moved between this and any
     /// previous function call.
     #[inline]
     pub unsafe fn lock(&self) { self.0.lock() }
 
-    /// Attempt to lock the mutex without blocking, returning whether it was
+    /// Attempts to lock the mutex without blocking, returning whether it was
     /// successfully acquired or not.
     ///
     /// Behavior is undefined if the mutex has been moved between this and any
@@ -39,14 +39,14 @@ pub unsafe fn lock(&self) { self.0.lock() }
     #[inline]
     pub unsafe fn try_lock(&self) -> bool { self.0.try_lock() }
 
-    /// Unlock the mutex.
+    /// Unlocks the mutex.
     ///
     /// Behavior is undefined if the current thread does not actually hold the
     /// mutex.
     #[inline]
     pub unsafe fn unlock(&self) { self.0.unlock() }
 
-    /// Deallocate all resources associated with this mutex.
+    /// Deallocates all resources associated with this mutex.
     ///
     /// Behavior is undefined if there are current or will be future users of
     /// this mutex.
index 347cd0b464ed95892e74b13adafdb30a3013e532..6deb4a48007b4aade00d2a07d341087e9b4a98ac 100644 (file)
@@ -116,7 +116,7 @@ fn description(&self) -> &str {
 }
 
 impl<T> PoisonError<T> {
-    /// Create a `PoisonError`.
+    /// Creates a `PoisonError`.
     #[unstable(feature = "std_misc")]
     pub fn new(guard: T) -> PoisonError<T> {
         PoisonError { guard: guard }
index f7d7a5715bc68647c9566e4a5c51d28e0b04f28e..725a09bcc86a99b88432adfefbc236a2369f0d66 100644 (file)
@@ -21,7 +21,7 @@
 pub const RWLOCK_INIT: RWLock = RWLock(imp::RWLOCK_INIT);
 
 impl RWLock {
-    /// Acquire shared access to the underlying lock, blocking the current
+    /// Acquires shared access to the underlying lock, blocking the current
     /// thread to do so.
     ///
     /// Behavior is undefined if the rwlock has been moved between this and any
@@ -29,7 +29,7 @@ impl RWLock {
     #[inline]
     pub unsafe fn read(&self) { self.0.read() }
 
-    /// Attempt to acquire shared access to this lock, returning whether it
+    /// Attempts to acquire shared access to this lock, returning whether it
     /// succeeded or not.
     ///
     /// This function does not block the current thread.
@@ -39,7 +39,7 @@ pub unsafe fn read(&self) { self.0.read() }
     #[inline]
     pub unsafe fn try_read(&self) -> bool { self.0.try_read() }
 
-    /// Acquire write access to the underlying lock, blocking the current thread
+    /// Acquires write access to the underlying lock, blocking the current thread
     /// to do so.
     ///
     /// Behavior is undefined if the rwlock has been moved between this and any
@@ -47,7 +47,7 @@ pub unsafe fn try_read(&self) -> bool { self.0.try_read() }
     #[inline]
     pub unsafe fn write(&self) { self.0.write() }
 
-    /// Attempt to acquire exclusive access to this lock, returning whether it
+    /// Attempts to acquire exclusive access to this lock, returning whether it
     /// succeeded or not.
     ///
     /// This function does not block the current thread.
@@ -57,20 +57,20 @@ pub unsafe fn write(&self) { self.0.write() }
     #[inline]
     pub unsafe fn try_write(&self) -> bool { self.0.try_write() }
 
-    /// Unlock previously acquired shared access to this lock.
+    /// Unlocks previously acquired shared access to this lock.
     ///
     /// Behavior is undefined if the current thread does not have shared access.
     #[inline]
     pub unsafe fn read_unlock(&self) { self.0.read_unlock() }
 
-    /// Unlock previously acquired exclusive access to this lock.
+    /// Unlocks previously acquired exclusive access to this lock.
     ///
     /// Behavior is undefined if the current thread does not currently have
     /// exclusive access.
     #[inline]
     pub unsafe fn write_unlock(&self) { self.0.write_unlock() }
 
-    /// Destroy OS-related resources with this RWLock.
+    /// Destroys OS-related resources with this RWLock.
     ///
     /// Behavior is undefined if there are any currently active users of this
     /// lock.
index 5995d7ac10f73d7b3270c9ab22f3303d20905c37..618a389110ac1627b3853da2848d0eae670b9e32 100644 (file)
@@ -207,7 +207,7 @@ unsafe fn lazy_init(&self) -> usize {
 }
 
 impl Key {
-    /// Create a new managed OS TLS key.
+    /// Creates a new managed OS TLS key.
     ///
     /// This key will be deallocated when the key falls out of scope.
     ///
index 987a12293da50c0a465cb43c9d3037b76117301f..34a4a773f8ea7233ee325efb551ee3cd8a27b2ca 100644 (file)
@@ -69,7 +69,7 @@ fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
 }
 
 impl CodePoint {
-    /// Unsafely create a new `CodePoint` without checking the value.
+    /// Unsafely creates a new `CodePoint` without checking the value.
     ///
     /// Only use when `value` is known to be less than or equal to 0x10FFFF.
     #[inline]
@@ -77,9 +77,9 @@ pub unsafe fn from_u32_unchecked(value: u32) -> CodePoint {
         CodePoint { value: value }
     }
 
-    /// Create a new `CodePoint` if the value is a valid code point.
+    /// Creates a new `CodePoint` if the value is a valid code point.
     ///
-    /// Return `None` if `value` is above 0x10FFFF.
+    /// Returns `None` if `value` is above 0x10FFFF.
     #[inline]
     pub fn from_u32(value: u32) -> Option<CodePoint> {
         match value {
@@ -88,7 +88,7 @@ pub fn from_u32(value: u32) -> Option<CodePoint> {
         }
     }
 
-    /// Create a new `CodePoint` from a `char`.
+    /// Creates a new `CodePoint` from a `char`.
     ///
     /// Since all Unicode scalar values are code points, this always succeeds.
     #[inline]
@@ -96,15 +96,15 @@ pub fn from_char(value: char) -> CodePoint {
         CodePoint { value: value as u32 }
     }
 
-    /// Return the numeric value of the code point.
+    /// Returns the numeric value of the code point.
     #[inline]
     pub fn to_u32(&self) -> u32 {
         self.value
     }
 
-    /// Optionally return a Unicode scalar value for the code point.
+    /// Optionally returns a Unicode scalar value for the code point.
     ///
-    /// Return `None` if the code point is a surrogate (from U+D800 to U+DFFF).
+    /// Returns `None` if the code point is a surrogate (from U+D800 to U+DFFF).
     #[inline]
     pub fn to_char(&self) -> Option<char> {
         match self.value {
@@ -113,9 +113,9 @@ pub fn to_char(&self) -> Option<char> {
         }
     }
 
-    /// Return a Unicode scalar value for the code point.
+    /// Returns a Unicode scalar value for the code point.
     ///
-    /// Return `'\u{FFFD}'` (the replacement character “�”)
+    /// Returns `'\u{FFFD}'` (the replacement character “�”)
     /// if the code point is a surrogate (from U+D800 to U+DFFF).
     #[inline]
     pub fn to_char_lossy(&self) -> char {
@@ -151,19 +151,19 @@ fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
 }
 
 impl Wtf8Buf {
-    /// Create an new, empty WTF-8 string.
+    /// Creates an new, empty WTF-8 string.
     #[inline]
     pub fn new() -> Wtf8Buf {
         Wtf8Buf { bytes: Vec::new() }
     }
 
-    /// Create an new, empty WTF-8 string with pre-allocated capacity for `n` bytes.
+    /// Creates an new, empty WTF-8 string with pre-allocated capacity for `n` bytes.
     #[inline]
     pub fn with_capacity(n: usize) -> Wtf8Buf {
         Wtf8Buf { bytes: Vec::with_capacity(n) }
     }
 
-    /// Create a WTF-8 string from an UTF-8 `String`.
+    /// Creates a WTF-8 string from an UTF-8 `String`.
     ///
     /// This takes ownership of the `String` and does not copy.
     ///
@@ -173,7 +173,7 @@ pub fn from_string(string: String) -> Wtf8Buf {
         Wtf8Buf { bytes: string.into_bytes() }
     }
 
-    /// Create a WTF-8 string from an UTF-8 `&str` slice.
+    /// Creates a WTF-8 string from an UTF-8 `&str` slice.
     ///
     /// This copies the content of the slice.
     ///
@@ -183,7 +183,7 @@ pub fn from_str(str: &str) -> Wtf8Buf {
         Wtf8Buf { bytes: <[_]>::to_vec(str.as_bytes()) }
     }
 
-    /// Create a WTF-8 string from a potentially ill-formed UTF-16 slice of 16-bit code units.
+    /// Creates a WTF-8 string from a potentially ill-formed UTF-16 slice of 16-bit code units.
     ///
     /// This is lossless: calling `.encode_wide()` on the resulting string
     /// will always return the original code units.
@@ -319,7 +319,7 @@ pub fn truncate(&mut self, new_len: usize) {
         self.bytes.truncate(new_len)
     }
 
-    /// Consume the WTF-8 string and try to convert it to UTF-8.
+    /// Consumes the WTF-8 string and tries to convert it to UTF-8.
     ///
     /// This does not copy the data.
     ///
@@ -333,7 +333,7 @@ pub fn into_string(self) -> Result<String, Wtf8Buf> {
         }
     }
 
-    /// Consume the WTF-8 string and convert it lossily to UTF-8.
+    /// Consumes the WTF-8 string and converts it lossily to UTF-8.
     ///
     /// This does not copy the data (but may overwrite parts of it in place).
     ///
@@ -454,7 +454,7 @@ fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
 }
 
 impl Wtf8 {
-    /// Create a WTF-8 slice from a UTF-8 `&str` slice.
+    /// Creates a WTF-8 slice from a UTF-8 `&str` slice.
     ///
     /// Since WTF-8 is a superset of UTF-8, this always succeeds.
     #[inline]
@@ -462,13 +462,13 @@ pub fn from_str(value: &str) -> &Wtf8 {
         unsafe { mem::transmute(value.as_bytes()) }
     }
 
-    /// Return the length, in WTF-8 bytes.
+    /// Returns the length, in WTF-8 bytes.
     #[inline]
     pub fn len(&self) -> usize {
         self.bytes.len()
     }
 
-    /// Return the code point at `position` if it is in the ASCII range,
+    /// Returns the code point at `position` if it is in the ASCII range,
     /// or `b'\xFF' otherwise.
     ///
     /// # Panics
@@ -482,7 +482,7 @@ pub fn ascii_byte_at(&self, position: usize) -> u8 {
         }
     }
 
-    /// Return the code point at `position`.
+    /// Returns the code point at `position`.
     ///
     /// # Panics
     ///
@@ -494,7 +494,7 @@ pub fn code_point_at(&self, position: usize) -> CodePoint {
         code_point
     }
 
-    /// Return the code point at `position`
+    /// Returns the code point at `position`
     /// and the position of the next code point.
     ///
     /// # Panics
@@ -507,15 +507,15 @@ pub fn code_point_range_at(&self, position: usize) -> (CodePoint, usize) {
         (CodePoint { value: c }, n)
     }
 
-    /// Return an iterator for the string’s code points.
+    /// Returns an iterator for the string’s code points.
     #[inline]
     pub fn code_points(&self) -> Wtf8CodePoints {
         Wtf8CodePoints { bytes: self.bytes.iter() }
     }
 
-    /// Try to convert the string to UTF-8 and return a `&str` slice.
+    /// Tries to convert the string to UTF-8 and return a `&str` slice.
     ///
-    /// Return `None` if the string contains surrogates.
+    /// Returns `None` if the string contains surrogates.
     ///
     /// This does not copy the data.
     #[inline]
@@ -528,8 +528,8 @@ pub fn as_str(&self) -> Option<&str> {
         }
     }
 
-    /// Lossily convert the string to UTF-8.
-    /// Return an UTF-8 `&str` slice if the contents are well-formed in UTF-8.
+    /// Lossily converts the string to UTF-8.
+    /// Returns an UTF-8 `&str` slice if the contents are well-formed in UTF-8.
     ///
     /// Surrogates are replaced with `"\u{FFFD}"` (the replacement character “�”).
     ///
@@ -559,7 +559,7 @@ pub fn to_string_lossy(&self) -> Cow<str> {
         }
     }
 
-    /// Convert the WTF-8 string to potentially ill-formed UTF-16
+    /// Converts the WTF-8 string to potentially ill-formed UTF-16
     /// and return an iterator of 16-bit code units.
     ///
     /// This is lossless:
index fbfbb40701fd9f5887a841ba7e50dde90ed36479..a95cb85e74a042fe98d987e8dd5980b758848cc0 100644 (file)
@@ -53,7 +53,7 @@ pub mod io {
     /// and `AsRawSocket` set of traits.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub trait AsRawFd {
-        /// Extract the raw file descriptor.
+        /// Extracts the raw file descriptor.
         ///
         /// This method does **not** pass ownership of the raw file descriptor
         /// to the caller. The descriptor is only guarantee to be valid while
@@ -216,11 +216,11 @@ pub mod ffi {
     /// Unix-specific extensions to `OsString`.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub trait OsStringExt {
-        /// Create an `OsString` from a byte vector.
+        /// Creates an `OsString` from a byte vector.
         #[stable(feature = "rust1", since = "1.0.0")]
         fn from_vec(vec: Vec<u8>) -> Self;
 
-        /// Yield the underlying byte vector of this `OsString`.
+        /// Yields the underlying byte vector of this `OsString`.
         #[stable(feature = "rust1", since = "1.0.0")]
         fn into_vec(self) -> Vec<u8>;
     }
@@ -241,7 +241,7 @@ pub trait OsStrExt {
         #[stable(feature = "rust1", since = "1.0.0")]
         fn from_bytes(slice: &[u8]) -> &Self;
 
-        /// Get the underlying byte view of the `OsStr` slice.
+        /// Gets the underlying byte view of the `OsStr` slice.
         #[stable(feature = "rust1", since = "1.0.0")]
         fn as_bytes(&self) -> &[u8];
     }
@@ -280,7 +280,7 @@ fn set_mode(&mut self, mode: i32) {
 
     /// Unix-specific extensions to `OpenOptions`
     pub trait OpenOptionsExt {
-        /// Set the mode bits that a new file will be created with.
+        /// Sets the mode bits that a new file will be created with.
         ///
         /// If a new file is created as part of a `File::open_opts` call then this
         /// specified `mode` will be used as the permission bits for the new file.
index d86c77624e833eb5c559c2654c7a5941343d3bcf..e5bdb554359df6257ddf43929c7dce9dc922fa11 100644 (file)
@@ -28,7 +28,7 @@ pub fn new(fd: c_int) -> FileDesc {
 
     pub fn raw(&self) -> c_int { self.fd }
 
-    /// Extract the actual filedescriptor without closing it.
+    /// Extracts the actual filedescriptor without closing it.
     pub fn into_raw(self) -> c_int {
         let fd = self.fd;
         unsafe { mem::forget(self) };
index 6121105f10b956c4cefb6ce859e9753726ee85ad..c74d6b7e0775ef50de68ade617df1ecbbbe27105 100644 (file)
@@ -130,7 +130,7 @@ pub fn fstat(&self) -> IoResult<FileStat> {
         }
     }
 
-    /// Extract the actual filedescriptor without closing it.
+    /// Extracts the actual filedescriptor without closing it.
     pub fn unwrap(self) -> fd_t {
         let fd = self.fd;
         unsafe { mem::forget(self) };
index e8409bb4fd42c3ae61d322ed070b19257b547d19..71da2f9219c2f91a0f36745a37c58ecae075e642 100644 (file)
@@ -85,7 +85,7 @@ pub fn last_gai_error(s: libc::c_int) -> IoError {
     err
 }
 
-/// Convert an `errno` value into a high-level error variant and description.
+/// Converts an `errno` value into a high-level error variant and description.
 #[allow(deprecated)]
 pub fn decode_error(errno: i32) -> IoError {
     // FIXME: this should probably be a bit more descriptive...
index d2220bdec32b78fa1f054a720742c900ac7a6e63..52ec6063d7a181b215787a9ebf35ea6daaa602a6 100644 (file)
@@ -86,7 +86,7 @@ unsafe fn errno_location() -> *const c_int {
     }
 }
 
-/// Get a detailed string description for the given error number
+/// Gets a detailed string description for the given error number.
 pub fn error_string(errno: i32) -> String {
     #[cfg(target_os = "linux")]
     extern {
index 2dd61861bd6dc8c78299ffb2b7c9065f3aef29c9..022407ebc024e556f9974aa13852f54b34a95df1 100644 (file)
@@ -38,7 +38,7 @@ pub mod io {
     /// Extract raw handles.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub trait AsRawHandle {
-        /// Extract the raw handle, without taking any ownership.
+        /// Extracts the raw handle, without taking any ownership.
         #[stable(feature = "rust1", since = "1.0.0")]
         fn as_raw_handle(&self) -> RawHandle;
     }
@@ -47,7 +47,7 @@ pub trait AsRawHandle {
     #[unstable(feature = "from_raw_os",
                reason = "recent addition to the std::os::windows::io module")]
     pub trait FromRawHandle {
-        /// Construct a new I/O object from the specified raw handle.
+        /// Constructs a new I/O object from the specified raw handle.
         ///
         /// This function will **consume ownership** of the handle given,
         /// passing responsibility for closing the handle to the returned
@@ -112,7 +112,7 @@ fn as_raw_handle(&self) -> RawHandle {
     /// Extract raw sockets.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub trait AsRawSocket {
-        /// Extract the underlying raw socket from this object.
+        /// Extracts the underlying raw socket from this object.
         #[stable(feature = "rust1", since = "1.0.0")]
         fn as_raw_socket(&self) -> RawSocket;
     }
@@ -214,7 +214,7 @@ pub mod ffi {
     /// Windows-specific extensions to `OsString`.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub trait OsStringExt {
-        /// Create an `OsString` from a potentially ill-formed UTF-16 slice of
+        /// Creates an `OsString` from a potentially ill-formed UTF-16 slice of
         /// 16-bit code units.
         ///
         /// This is lossless: calling `.encode_wide()` on the resulting string
@@ -233,7 +233,7 @@ fn from_wide(wide: &[u16]) -> OsString {
     /// Windows-specific extensions to `OsStr`.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub trait OsStrExt {
-        /// Re-encode an `OsStr` as a wide character sequence,
+        /// Re-encodes an `OsStr` as a wide character sequence,
         /// i.e. potentially ill-formed UTF-16.
         ///
         /// This is lossless. Note that the encoding does not include a final
@@ -258,25 +258,25 @@ pub mod fs {
 
     /// Windows-specific extensions to `OpenOptions`
     pub trait OpenOptionsExt {
-        /// Override the `dwDesiredAccess` argument to the call to `CreateFile`
+        /// Overrides the `dwDesiredAccess` argument to the call to `CreateFile`
         /// with the specified value.
         fn desired_access(&mut self, access: i32) -> &mut Self;
 
-        /// Override the `dwCreationDisposition` argument to the call to
+        /// Overrides the `dwCreationDisposition` argument to the call to
         /// `CreateFile` with the specified value.
         ///
         /// This will override any values of the standard `create` flags, for
         /// example.
         fn creation_disposition(&mut self, val: i32) -> &mut Self;
 
-        /// Override the `dwFlagsAndAttributes` argument to the call to
+        /// Overrides the `dwFlagsAndAttributes` argument to the call to
         /// `CreateFile` with the specified value.
         ///
         /// This will override any values of the standard flags on the
         /// `OpenOptions` structure.
         fn flags_and_attributes(&mut self, val: i32) -> &mut Self;
 
-        /// Override the `dwShareMode` argument to the call to `CreateFile` with
+        /// Overrides the `dwShareMode` argument to the call to `CreateFile` with
         /// the specified value.
         ///
         /// This will override any values of the standard flags on the
index e9d5fca531fdb8b7ecd5fd3f8360b2d5059879c4..eb031e9b745f8e43b5cf1ae146adf046e00c84e4 100644 (file)
@@ -95,7 +95,7 @@ pub fn last_gai_error(_errno: i32) -> IoError {
     last_net_error()
 }
 
-/// Convert an `errno` value into a high-level error variant and description.
+/// Converts an `errno` value into a high-level error variant and description.
 #[allow(deprecated)]
 pub fn decode_error(errno: i32) -> IoError {
     let (kind, desc) = match errno {
index d5843a2f9987b153b67543303530eb44dc9af436..232e5669c2b90b176dd482b879500618e7072455 100644 (file)
@@ -42,7 +42,7 @@ pub fn errno() -> i32 {
     unsafe { libc::GetLastError() as i32 }
 }
 
-/// Get a detailed string description for the given error number
+/// Gets a detailed string description for the given error number.
 pub fn error_string(errnum: i32) -> String {
     use libc::types::os::arch::extra::DWORD;
     use libc::types::os::arch::extra::LPWSTR;
index f5a1093be2b1e9ee83f8cfcb3e960c99e310396c..cc4031cc180765ffa7866f18c7af120e3844959a 100644 (file)
@@ -226,7 +226,7 @@ pub enum LocalKeyState {
 }
 
 impl<T: 'static> LocalKey<T> {
-    /// Acquire a reference to the value in this TLS key.
+    /// Acquires a reference to the value in this TLS key.
     ///
     /// This will lazily initialize the value if this thread has not referenced
     /// this key yet.
index 0e5fee27ffe22372b421cb98d2ff90c192ef49b4..5db7e9773c9834ba583a8947af15c3f4db5590f2 100644 (file)
@@ -215,7 +215,7 @@ pub struct Builder {
 }
 
 impl Builder {
-    /// Generate the base configuration for spawning a thread, from which
+    /// Generates the base configuration for spawning a thread, from which
     /// configuration methods can be chained.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn new() -> Builder {
@@ -225,7 +225,7 @@ pub fn new() -> Builder {
         }
     }
 
-    /// Name the thread-to-be. Currently the name is used for identification
+    /// Names the thread-to-be. Currently the name is used for identification
     /// only in panic messages.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn name(mut self, name: String) -> Builder {
@@ -233,14 +233,14 @@ pub fn name(mut self, name: String) -> Builder {
         self
     }
 
-    /// Set the size of the stack for the new thread.
+    /// Sets the size of the stack for the new thread.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn stack_size(mut self, size: usize) -> Builder {
         self.stack_size = Some(size);
         self
     }
 
-    /// Spawn a new thread, and return a join handle for it.
+    /// Spawns a new thread, and returns a join handle for it.
     ///
     /// The child thread may outlive the parent (unless the parent thread
     /// is the main thread; the whole process is terminated when the main
@@ -259,8 +259,8 @@ pub fn spawn<F>(self, f: F) -> io::Result<JoinHandle> where
         self.spawn_inner(Box::new(f)).map(|i| JoinHandle(i))
     }
 
-    /// Spawn a new child thread that must be joined within a given
-    /// scope, and return a `JoinGuard`.
+    /// Spawns a new child thread that must be joined within a given
+    /// scope, and returns a `JoinGuard`.
     ///
     /// The join guard can be used to explicitly join the child thread (via
     /// `join`), returning `Result<T>`, or it will implicitly join the child
@@ -355,7 +355,7 @@ fn spawn_inner<T: Send>(self, f: Thunk<(), T>) -> io::Result<JoinInner<T>> {
 // Free functions
 ////////////////////////////////////////////////////////////////////////////////
 
-/// Spawn a new thread, returning a `JoinHandle` for it.
+/// Spawns a new thread, returning a `JoinHandle` for it.
 ///
 /// The join handle will implicitly *detach* the child thread upon being
 /// dropped. In this case, the child thread may outlive the parent (unless
@@ -374,7 +374,7 @@ pub fn spawn<F>(f: F) -> JoinHandle where F: FnOnce(), F: Send + 'static {
     Builder::new().spawn(f).unwrap()
 }
 
-/// Spawn a new *scoped* thread, returning a `JoinGuard` for it.
+/// Spawns a new *scoped* thread, returning a `JoinGuard` for it.
 ///
 /// The join guard can be used to explicitly join the child thread (via
 /// `join`), returning `Result<T>`, or it will implicitly join the child
@@ -400,7 +400,7 @@ pub fn current() -> Thread {
     thread_info::current_thread()
 }
 
-/// Cooperatively give up a timeslice to the OS scheduler.
+/// Cooperatively gives up a timeslice to the OS scheduler.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub fn yield_now() {
     unsafe { imp::yield_now() }
@@ -413,7 +413,7 @@ pub fn panicking() -> bool {
     unwind::panicking()
 }
 
-/// Invoke a closure, capturing the cause of panic if one occurs.
+/// Invokes a closure, capturing the cause of panic if one occurs.
 ///
 /// This function will return `Ok(())` if the closure does not panic, and will
 /// return `Err(cause)` if the closure panics. The `cause` returned is the
@@ -462,7 +462,7 @@ pub fn catch_panic<F, R>(f: F) -> Result<R>
     Ok(result.unwrap())
 }
 
-/// Put the current thread to sleep for the specified amount of time.
+/// Puts the current thread to sleep for the specified amount of time.
 ///
 /// The thread may sleep longer than the duration specified due to scheduling
 /// specifics or platform-dependent functionality. Note that on unix platforms
@@ -482,7 +482,7 @@ pub fn sleep(dur: Duration) {
     imp::sleep(dur)
 }
 
-/// Block unless or until the current thread's token is made available (may wake spuriously).
+/// Blocks unless or until the current thread's token is made available (may wake spuriously).
 ///
 /// See the module doc for more detail.
 //
@@ -501,7 +501,7 @@ pub fn park() {
     *guard = false;
 }
 
-/// Block unless or until the current thread's token is made available or
+/// Blocks unless or until the current thread's token is made available or
 /// the specified duration has been reached (may wake spuriously).
 ///
 /// The semantics of this function are equivalent to `park()` except that the
@@ -573,7 +573,7 @@ pub fn unpark(&self) {
         }
     }
 
-    /// Get the thread's name.
+    /// Gets the thread's name.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn name(&self) -> Option<&str> {
         self.inner.name.as_ref().map(|s| &**s)
@@ -638,13 +638,13 @@ fn join(&mut self) -> Result<T> {
 pub struct JoinHandle(JoinInner<()>);
 
 impl JoinHandle {
-    /// Extract a handle to the underlying thread
+    /// Extracts a handle to the underlying thread
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn thread(&self) -> &Thread {
         &self.0.thread
     }
 
-    /// Wait for the associated thread to finish.
+    /// Waits for the associated thread to finish.
     ///
     /// If the child thread panics, `Err` is returned with the parameter given
     /// to `panic`.
@@ -684,13 +684,13 @@ pub struct JoinGuard<'a, T: Send + 'a> {
 unsafe impl<'a, T: Send + 'a> Sync for JoinGuard<'a, T> {}
 
 impl<'a, T: Send + 'a> JoinGuard<'a, T> {
-    /// Extract a handle to the thread this guard will join on.
+    /// Extracts a handle to the thread this guard will join on.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn thread(&self) -> &Thread {
         &self.inner.thread
     }
 
-    /// Wait for the associated thread to finish, returning the result of the
+    /// Waits for the associated thread to finish, returning the result of the
     /// thread's calculation.
     ///
     /// # Panics
index fa980954c2f8c1ee19a63efdbbfc5dffdd322c91..9c0b4a5d8337800211d774098f57f81fa9f5a132 100644 (file)
@@ -135,7 +135,7 @@ macro_rules! __scoped_thread_local_inner {
            reason = "scoped TLS has yet to have wide enough use to fully consider \
                      stabilizing its interface")]
 impl<T> ScopedKey<T> {
-    /// Insert a value into this scoped thread local storage slot for a
+    /// Inserts a value into this scoped thread local storage slot for a
     /// duration of a closure.
     ///
     /// While `cb` is running, the value `t` will be returned by `get` unless
@@ -188,7 +188,7 @@ fn drop(&mut self) {
         cb()
     }
 
-    /// Get a value out of this scoped variable.
+    /// Gets a value out of this scoped variable.
     ///
     /// This function takes a closure which receives the value of this
     /// variable.