mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 19:58:32 +00:00
Rollup merge of #21924 - steveklabnik:fix_try_docs, r=huonw
This is now a Result, not an Option.
This commit is contained in:
commit
60cb151be0
@ -98,8 +98,8 @@ thread_local! { static PANICKING: Cell<bool> = Cell::new(false) }
|
|||||||
|
|
||||||
/// Invoke a closure, capturing the cause of panic if one occurs.
|
/// Invoke a closure, capturing the cause of panic if one occurs.
|
||||||
///
|
///
|
||||||
/// This function will return `None` if the closure did not panic, and will
|
/// This function will return `Ok(())` if the closure did not panic, and will
|
||||||
/// return `Some(cause)` if the closure panics. The `cause` returned is the
|
/// return `Err(cause)` if the closure panics. The `cause` returned is the
|
||||||
/// object with which panic was originally invoked.
|
/// object with which panic was originally invoked.
|
||||||
///
|
///
|
||||||
/// This function also is unsafe for a variety of reasons:
|
/// This function also is unsafe for a variety of reasons:
|
||||||
|
Loading…
Reference in New Issue
Block a user