From 85e94a2da8734462457c377c844745f71c6b2031 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Wed, 31 Aug 2022 10:35:36 +0200 Subject: [PATCH] =?UTF-8?q?Link=20=E2=80=9C=3F=20operator=E2=80=9D=20to=20?= =?UTF-8?q?relevant=20chapter=20in=20The=20Book?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before, the text simply asked people to use a symbol which is hard to search for. Now the text links back to the chapter on error propagation in The Book. That should help people find the relevant keywords for further searches. --- core/src/macros/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/macros/mod.rs b/core/src/macros/mod.rs index 0bd9c8e9a..b37e9142d 100644 --- a/core/src/macros/mod.rs +++ b/core/src/macros/mod.rs @@ -350,10 +350,12 @@ macro_rules! matches { /// Unwraps a result or propagates its error. /// -/// The `?` operator was added to replace `try!` and should be used instead. -/// Furthermore, `try` is a reserved word in Rust 2018, so if you must use -/// it, you will need to use the [raw-identifier syntax][ris]: `r#try`. +/// The [`?` operator][propagating-errors] was added to replace `try!` +/// and should be used instead. Furthermore, `try` is a reserved word +/// in Rust 2018, so if you must use it, you will need to use the +/// [raw-identifier syntax][ris]: `r#try`. /// +/// [propagating-errors]: https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html#a-shortcut-for-propagating-errors-the--operator /// [ris]: https://doc.rust-lang.org/nightly/rust-by-example/compatibility/raw_identifiers.html /// /// `try!` matches the given [`Result`]. In case of the `Ok` variant, the