Rollup merge of #27235 - tbu-:pr_catch_panic_doc, r=steveklabnik

Fixes #27027.
This commit is contained in:
Steve Klabnik 2015-07-24 14:56:03 -04:00
commit 8b6b6c678b
1 changed files with 3 additions and 3 deletions

View File

@ -434,9 +434,9 @@ pub fn panicking() -> bool {
/// 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
/// object with which panic was originally invoked.
/// This function will return `Ok` with the closure's result if the closure
/// does not panic, and will return `Err(cause)` if the closure panics. The
/// `cause` returned is the object with which panic was originally invoked.
///
/// It is currently undefined behavior to unwind from Rust code into foreign
/// code, so this function is particularly useful when Rust is called from