]> git.lizzy.rs Git - rust.git/commitdiff
docs: Standardize on 'Errors' header in std docs
authorKamal Marhubi <kamal@marhubi.com>
Tue, 2 Feb 2016 02:41:29 +0000 (21:41 -0500)
committerKamal Marhubi <kamal@marhubi.com>
Tue, 2 Feb 2016 02:41:29 +0000 (21:41 -0500)
src/libcollections/str.rs
src/libcollections/string.rs
src/libcore/str/mod.rs
src/librustc_unicode/char.rs
src/libstd/fs.rs
src/libstd/sync/condvar.rs
src/libstd/sync/mutex.rs
src/libstd/sync/rwlock.rs
src/libstd/sys/common/remutex.rs

index 094b7f1d034536494d7e8554f22886582451306c..118675ab2c51dfec613400b3228c3080f50ecef0 100644 (file)
@@ -1644,7 +1644,7 @@ pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str
     ///
     /// [`FromStr`]: str/trait.FromStr.html
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// Will return `Err` if it's not possible to parse this string slice into
     /// the desired type.
index 97c12043e763475a96cb5a509adf771abef0b53d..b1242ba6d4df25a8e4135e218c2c9544a092e56c 100644 (file)
@@ -433,7 +433,7 @@ pub fn from_str(_: &str) -> String {
     ///
     /// [`str::from_utf8()`]: ../str/fn.from_utf8.html
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// Returns `Err` if the slice is not UTF-8 with a description as to why the
     /// provided bytes are not UTF-8. The vector you moved in is also included.
index 3892455395f76eeb9d78532049d9929daa006688..f19970546d79b20d1991b9ee8e3feb20f03c69f9 100644 (file)
@@ -188,7 +188,7 @@ pub fn valid_up_to(&self) -> usize { self.valid_up_to }
 /// it, this function is one way to have a stack-allocated string. There is
 /// an example of this in the examples section below.
 ///
-/// # Failure
+/// # Errors
 ///
 /// Returns `Err` if the slice is not UTF-8 with a description as to why the
 /// provided slice is not UTF-8.
index 46ecd3a80b5d12e8bc77f855773a888bc16caf36..9386453d660d23b60600c2b63638f09a9431592b 100644 (file)
@@ -194,7 +194,7 @@ pub fn is_digit(self, radix: u32) -> bool {
     /// * `a-z`
     /// * `A-Z`
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// Returns `None` if the `char` does not refer to a digit in the given radix.
     ///
index e40a3d06f77537201336b442ee78d6dc47bc05d6..d12cfa6183a241aee0391405af3bd2d9f85d5616 100644 (file)
@@ -70,7 +70,7 @@ pub struct File {
 /// information like the entry's path and possibly other metadata can be
 /// learned.
 ///
-/// # Failure
+/// # Errors
 ///
 /// This `io::Result` will be an `Err` if there's some sort of intermittent
 /// IO error during iteration.
index 1f7fe820bf86a37c7edd5dbdd240afabce4df954..9a786752365f1d4c890f909bae85b5d56d80a876 100644 (file)
@@ -129,7 +129,7 @@ pub fn new() -> Condvar {
     /// the predicate must always be checked each time this function returns to
     /// protect against spurious wakeups.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// This function will return an error if the mutex being waited on is
     /// poisoned when this thread re-acquires the lock. For more information,
index 6b20e51967d882a25b7bede01575bc79f3d26118..fe9f0371abd5d3b418980eb81954952b02c08c7c 100644 (file)
@@ -205,7 +205,7 @@ impl<T: ?Sized> Mutex<T> {
     /// held. An RAII guard is returned to allow scoped unlock of the lock. When
     /// the guard goes out of scope, the mutex will be unlocked.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// If another user of this mutex panicked while holding the mutex, then
     /// this call will return an error once the mutex is acquired.
@@ -223,7 +223,7 @@ pub fn lock(&self) -> LockResult<MutexGuard<T>> {
     ///
     /// This function does not block.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// If another user of this mutex panicked while holding the mutex, then
     /// this call will return failure if the mutex would otherwise be
@@ -250,7 +250,7 @@ pub fn is_poisoned(&self) -> bool {
 
     /// Consumes this mutex, returning the underlying data.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// If another user of this mutex panicked while holding the mutex, then
     /// this call will return an error instead.
@@ -280,7 +280,7 @@ pub fn into_inner(self) -> LockResult<T> where T: Sized {
     /// Since this call borrows the `Mutex` mutably, no actual locking needs to
     /// take place---the mutable borrow statically guarantees no locks exist.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// If another user of this mutex panicked while holding the mutex, then
     /// this call will return an error instead.
index 3dbef4354813629ac6b0d42768db2bdd8b77c3f2..63ef7732ad650cc71deb1cd9984fed434a52dfaf 100644 (file)
@@ -169,7 +169,7 @@ impl<T: ?Sized> RwLock<T> {
     /// Returns an RAII guard which will release this thread's shared access
     /// once it is dropped.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// This function will return an error if the RwLock is poisoned. An RwLock
     /// is poisoned whenever a writer panics while holding an exclusive lock.
@@ -192,7 +192,7 @@ pub fn read(&self) -> LockResult<RwLockReadGuard<T>> {
     /// This function does not provide any guarantees with respect to the ordering
     /// of whether contentious readers or writers will acquire the lock first.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// This function will return an error if the RwLock is poisoned. An RwLock
     /// is poisoned whenever a writer panics while holding an exclusive lock. An
@@ -217,7 +217,7 @@ pub fn try_read(&self) -> TryLockResult<RwLockReadGuard<T>> {
     /// Returns an RAII guard which will drop the write access of this rwlock
     /// when dropped.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// This function will return an error if the RwLock is poisoned. An RwLock
     /// is poisoned whenever a writer panics while holding an exclusive lock.
@@ -240,7 +240,7 @@ pub fn write(&self) -> LockResult<RwLockWriteGuard<T>> {
     /// This function does not provide any guarantees with respect to the ordering
     /// of whether contentious readers or writers will acquire the lock first.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// This function will return an error if the RwLock is poisoned. An RwLock
     /// is poisoned whenever a writer panics while holding an exclusive lock. An
@@ -269,7 +269,7 @@ pub fn is_poisoned(&self) -> bool {
 
     /// Consumes this `RwLock`, returning the underlying data.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// This function will return an error if the RwLock is poisoned. An RwLock
     /// is poisoned whenever a writer panics while holding an exclusive lock. An
@@ -301,7 +301,7 @@ pub fn into_inner(self) -> LockResult<T> where T: Sized {
     /// Since this call borrows the `RwLock` mutably, no actual locking needs to
     /// take place---the mutable borrow statically guarantees no locks exist.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// This function will return an error if the RwLock is poisoned. An RwLock
     /// is poisoned whenever a writer panics while holding an exclusive lock. An
index 31caa68c4b7ea70bcd89871e305a68076738eebf..2e2be63c3cb5b300ea63c813cc8951e74acc53a9 100644 (file)
@@ -78,7 +78,7 @@ pub fn new(t: T) -> ReentrantMutex<T> {
     /// calling this method already holds the lock, the call shall succeed without
     /// blocking.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// If another user of this mutex panicked while holding the mutex, then
     /// this call will return failure if the mutex would otherwise be
@@ -95,7 +95,7 @@ pub fn lock(&self) -> LockResult<ReentrantMutexGuard<T>> {
     ///
     /// This function does not block.
     ///
-    /// # Failure
+    /// # Errors
     ///
     /// If another user of this mutex panicked while holding the mutex, then
     /// this call will return failure if the mutex would otherwise be