Skip to content

Commit

Permalink
Fix thread::catch_panic documentation to mention its return value o…
Browse files Browse the repository at this point in the history
…n success

Fixes #27027.
  • Loading branch information
tbu- committed Jul 23, 2015
1 parent d4d4206 commit a700546
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libstd/thread/mod.rs
Expand Up @@ -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
Expand Down

0 comments on commit a700546

Please sign in to comment.