From 8bf77fa786aae4993fa923f0826529bfb9ce1166 Mon Sep 17 00:00:00 2001 From: Barosl Lee Date: Wed, 12 Nov 2014 03:36:09 +0900 Subject: Fix remaining documentation to reflect fail!() -> panic!() Throughout the docs, "failure" was replaced with "panics" if it means a task panic. Otherwise, it remained as is, or changed to "errors" to clearly differentiate it from a task panic. --- src/libsync/comm/mod.rs | 2 +- src/libsync/lock.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsync') diff --git a/src/libsync/comm/mod.rs b/src/libsync/comm/mod.rs index 247f50d666e..65b3e30c2b9 100644 --- a/src/libsync/comm/mod.rs +++ b/src/libsync/comm/mod.rs @@ -43,7 +43,7 @@ //! "rendezvous" channel where each sender atomically hands off a message to //! a receiver. //! -//! ## Failure Propagation +//! ## Panic Propagation //! //! In addition to being a core primitive for communicating in rust, channels //! are the points at which panics are propagated among tasks. Whenever the one diff --git a/src/libsync/lock.rs b/src/libsync/lock.rs index a9b0b7c4803..0ef3e77da00 100644 --- a/src/libsync/lock.rs +++ b/src/libsync/lock.rs @@ -345,9 +345,9 @@ impl RWLock { /// Access the underlying data immutably. May run concurrently with other /// reading tasks. /// - /// # Failure + /// # Panics /// - /// Failing will unlock the lock while unwinding. However, unlike all other + /// Panicking will unlock the lock while unwinding. However, unlike all other /// access modes, this will not poison the lock. pub fn read<'a>(&'a self) -> RWLockReadGuard<'a, T> { let guard = self.lock.read(); -- cgit 1.4.1-3-g733a5