|
18 | 18 | //!
|
19 | 19 | //! * [`panic!`] and [`panic_any`] (Constructing, Propagated automatically)
|
20 | 20 | //! * [`PanicInfo`] (Reporting)
|
21 |
| -//! * [`set_hook`], [`take_hook`], and [`#[panic_handler]`] (Reporting) |
| 21 | +//! * [`set_hook`], [`take_hook`], and [`#[panic_handler]`][panic-handler] (Reporting) |
22 | 22 | //! * [`catch_unwind`] and [`resume_unwind`] (Discarding, Propagating)
|
23 | 23 | //!
|
24 | 24 | //! The following are the primary interfaces of the error system and the
|
|
27 | 27 | //! * [`Result`] (Propagating, Reacting)
|
28 | 28 | //! * The [`Error`] trait (Reporting)
|
29 | 29 | //! * User defined types (Constructing / Representing)
|
30 |
| -//! * `match` and [`downcast`] (Reacting) |
31 |
| -//! * The propagation operator (`?`) (Propagating) |
| 30 | +//! * [`match`] and [`downcast`] (Reacting) |
| 31 | +//! * The question mark operator ([`?`]) (Propagating) |
32 | 32 | //! * The partially stable [`Try`] traits (Propagating, Constructing)
|
33 | 33 | //! * [`Termination`] (Reporting)
|
34 | 34 | //!
|
|
39 | 39 | //! to a caller. For these situations the standard library provides APIs for
|
40 | 40 | //! constructing panics with an `Error` as it's source.
|
41 | 41 | //!
|
42 |
| -//! * `Result::unwrap` |
43 |
| -//! * `Result::expect` |
| 42 | +//! * [`Result::unwrap`] |
| 43 | +//! * [`Result::expect`] |
44 | 44 | //!
|
45 | 45 | //! These functions are equivalent, they either return the inner value if the
|
46 | 46 | //! `Result` is `Ok` or panic if the `Result` is `Err` printing the inner error
|
|
122 | 122 | //! "should" as in "env variable should be set by blah" or "the given binary
|
123 | 123 | //! should be available and executable by the current user".
|
124 | 124 | //!
|
125 |
| -//! [panic hook]: crate::panic::set_hook |
126 |
| -//! [`set_hook`]: crate::panic::set_hook |
127 |
| -//! [`take_hook`]: crate::panic::take_hook |
128 |
| -//! [`PanicInfo`]: crate::panic::PanicInfo |
129 | 125 | //! [`panic_any`]: crate::panic::panic_any
|
130 |
| -//! [`#[panic_handler]`]: https://doc.rust-lang.org/nomicon/panic-handler.html |
| 126 | +//! [`PanicInfo`]: crate::panic::PanicInfo |
131 | 127 | //! [`catch_unwind`]: crate::panic::catch_unwind
|
132 | 128 | //! [`resume_unwind`]: crate::panic::resume_unwind
|
| 129 | +//! [`downcast`]: crate::error::Error |
133 | 130 | //! [`Termination`]: crate::process::Termination
|
134 | 131 | //! [`Try`]: crate::ops::Try
|
135 |
| -//! [`downcast`]: crate::error::Error |
| 132 | +//! [panic hook]: crate::panic::set_hook |
| 133 | +//! [`set_hook`]: crate::panic::set_hook |
| 134 | +//! [`take_hook`]: crate::panic::take_hook |
| 135 | +//! [panic-handler]: <https://doc.rust-lang.org/nomicon/panic-handler.html> |
| 136 | +//! [`match`]: ../../std/keyword.match.html |
| 137 | +//! [`?`]: ../../std/result/index.html#the-question-mark-operator- |
136 | 138 |
|
137 | 139 | #![stable(feature = "rust1", since = "1.0.0")]
|
138 | 140 |
|
|
0 commit comments