Skip to content

Commit 129a623

Browse files
committed
docs: Standardize on 'Errors' header in std docs
1 parent 49fe519 commit 129a623

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ impl str {
16441644
///
16451645
/// [`FromStr`]: str/trait.FromStr.html
16461646
///
1647-
/// # Failure
1647+
/// # Errors
16481648
///
16491649
/// Will return `Err` if it's not possible to parse this string slice into
16501650
/// the desired type.

src/libcollections/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ impl String {
433433
///
434434
/// [`str::from_utf8()`]: ../str/fn.from_utf8.html
435435
///
436-
/// # Failure
436+
/// # Errors
437437
///
438438
/// Returns `Err` if the slice is not UTF-8 with a description as to why the
439439
/// provided bytes are not UTF-8. The vector you moved in is also included.

src/libcore/str/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl Utf8Error {
188188
/// it, this function is one way to have a stack-allocated string. There is
189189
/// an example of this in the examples section below.
190190
///
191-
/// # Failure
191+
/// # Errors
192192
///
193193
/// Returns `Err` if the slice is not UTF-8 with a description as to why the
194194
/// provided slice is not UTF-8.

src/librustc_unicode/char.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl char {
194194
/// * `a-z`
195195
/// * `A-Z`
196196
///
197-
/// # Failure
197+
/// # Errors
198198
///
199199
/// Returns `None` if the `char` does not refer to a digit in the given radix.
200200
///

src/libstd/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub struct Metadata(fs_imp::FileAttr);
7070
/// information like the entry's path and possibly other metadata can be
7171
/// learned.
7272
///
73-
/// # Failure
73+
/// # Errors
7474
///
7575
/// This `io::Result` will be an `Err` if there's some sort of intermittent
7676
/// IO error during iteration.

src/libstd/sync/condvar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl Condvar {
129129
/// the predicate must always be checked each time this function returns to
130130
/// protect against spurious wakeups.
131131
///
132-
/// # Failure
132+
/// # Errors
133133
///
134134
/// This function will return an error if the mutex being waited on is
135135
/// poisoned when this thread re-acquires the lock. For more information,

src/libstd/sync/mutex.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl<T: ?Sized> Mutex<T> {
205205
/// held. An RAII guard is returned to allow scoped unlock of the lock. When
206206
/// the guard goes out of scope, the mutex will be unlocked.
207207
///
208-
/// # Failure
208+
/// # Errors
209209
///
210210
/// If another user of this mutex panicked while holding the mutex, then
211211
/// this call will return an error once the mutex is acquired.
@@ -223,7 +223,7 @@ impl<T: ?Sized> Mutex<T> {
223223
///
224224
/// This function does not block.
225225
///
226-
/// # Failure
226+
/// # Errors
227227
///
228228
/// If another user of this mutex panicked while holding the mutex, then
229229
/// this call will return failure if the mutex would otherwise be
@@ -250,7 +250,7 @@ impl<T: ?Sized> Mutex<T> {
250250

251251
/// Consumes this mutex, returning the underlying data.
252252
///
253-
/// # Failure
253+
/// # Errors
254254
///
255255
/// If another user of this mutex panicked while holding the mutex, then
256256
/// this call will return an error instead.
@@ -280,7 +280,7 @@ impl<T: ?Sized> Mutex<T> {
280280
/// Since this call borrows the `Mutex` mutably, no actual locking needs to
281281
/// take place---the mutable borrow statically guarantees no locks exist.
282282
///
283-
/// # Failure
283+
/// # Errors
284284
///
285285
/// If another user of this mutex panicked while holding the mutex, then
286286
/// this call will return an error instead.

src/libstd/sync/rwlock.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl<T: ?Sized> RwLock<T> {
169169
/// Returns an RAII guard which will release this thread's shared access
170170
/// once it is dropped.
171171
///
172-
/// # Failure
172+
/// # Errors
173173
///
174174
/// This function will return an error if the RwLock is poisoned. An RwLock
175175
/// is poisoned whenever a writer panics while holding an exclusive lock.
@@ -192,7 +192,7 @@ impl<T: ?Sized> RwLock<T> {
192192
/// This function does not provide any guarantees with respect to the ordering
193193
/// of whether contentious readers or writers will acquire the lock first.
194194
///
195-
/// # Failure
195+
/// # Errors
196196
///
197197
/// This function will return an error if the RwLock is poisoned. An RwLock
198198
/// is poisoned whenever a writer panics while holding an exclusive lock. An
@@ -217,7 +217,7 @@ impl<T: ?Sized> RwLock<T> {
217217
/// Returns an RAII guard which will drop the write access of this rwlock
218218
/// when dropped.
219219
///
220-
/// # Failure
220+
/// # Errors
221221
///
222222
/// This function will return an error if the RwLock is poisoned. An RwLock
223223
/// is poisoned whenever a writer panics while holding an exclusive lock.
@@ -240,7 +240,7 @@ impl<T: ?Sized> RwLock<T> {
240240
/// This function does not provide any guarantees with respect to the ordering
241241
/// of whether contentious readers or writers will acquire the lock first.
242242
///
243-
/// # Failure
243+
/// # Errors
244244
///
245245
/// This function will return an error if the RwLock is poisoned. An RwLock
246246
/// is poisoned whenever a writer panics while holding an exclusive lock. An
@@ -269,7 +269,7 @@ impl<T: ?Sized> RwLock<T> {
269269

270270
/// Consumes this `RwLock`, returning the underlying data.
271271
///
272-
/// # Failure
272+
/// # Errors
273273
///
274274
/// This function will return an error if the RwLock is poisoned. An RwLock
275275
/// is poisoned whenever a writer panics while holding an exclusive lock. An
@@ -301,7 +301,7 @@ impl<T: ?Sized> RwLock<T> {
301301
/// Since this call borrows the `RwLock` mutably, no actual locking needs to
302302
/// take place---the mutable borrow statically guarantees no locks exist.
303303
///
304-
/// # Failure
304+
/// # Errors
305305
///
306306
/// This function will return an error if the RwLock is poisoned. An RwLock
307307
/// is poisoned whenever a writer panics while holding an exclusive lock. An

src/libstd/sys/common/remutex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl<T> ReentrantMutex<T> {
7878
/// calling this method already holds the lock, the call shall succeed without
7979
/// blocking.
8080
///
81-
/// # Failure
81+
/// # Errors
8282
///
8383
/// If another user of this mutex panicked while holding the mutex, then
8484
/// this call will return failure if the mutex would otherwise be
@@ -95,7 +95,7 @@ impl<T> ReentrantMutex<T> {
9595
///
9696
/// This function does not block.
9797
///
98-
/// # Failure
98+
/// # Errors
9999
///
100100
/// If another user of this mutex panicked while holding the mutex, then
101101
/// this call will return failure if the mutex would otherwise be

0 commit comments

Comments
 (0)